summaryrefslogtreecommitdiffstats
path: root/tokio/src/util/mod.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2019-11-20 00:05:14 -0800
committerGitHub <noreply@github.com>2019-11-20 00:05:14 -0800
commit69975fb9601bbb21659db283d888470733bae660 (patch)
tree8db7c9a31e4125646634af09e197ae6479e10cc4 /tokio/src/util/mod.rs
parent7c8b8877d440629ab9a27a2c9dcef859835d3536 (diff)
Refactor the I/O driver, extracting slab to `tokio::util`. (#1792)
The I/O driver is made private and moved to `tokio::io::driver`. `Registration` is moved to `tokio::io::Registration` and `PollEvented` is moved to `tokio::io::PollEvented`. Additionally, the concurrent slab used by the I/O driver is cleaned up and extracted to `tokio::util::slab`, allowing it to eventually be used by other types.
Diffstat (limited to 'tokio/src/util/mod.rs')
-rw-r--r--tokio/src/util/mod.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/tokio/src/util/mod.rs b/tokio/src/util/mod.rs
index 44377fcf..a50b33ac 100644
--- a/tokio/src/util/mod.rs
+++ b/tokio/src/util/mod.rs
@@ -1,5 +1,12 @@
-mod pad;
-pub(crate) use self::pad::CachePadded;
+cfg_io_driver! {
+ pub(crate) mod bit;
+ pub(crate) mod slab;
+}
-mod rand;
-pub(crate) use self::rand::FastRand;
+cfg_rt_threaded! {
+ mod pad;
+ pub(crate) use pad::CachePadded;
+
+ mod rand;
+ pub(crate) use rand::FastRand;
+}