Implementing LoopData

This type acts for a handle to storage of non-`Send` data. The handle itself is
sendable across threads and is therefore suitable for storage in a `Future`.
This data uses communication internally and a new method on `Task` to ensure
that when the data needs to be accessed the future will find its way to the
right thread.

More on this type coming soon!
This commit is contained in:
Alex Crichton
2016-08-04 20:34:54 -07:00
parent 04bd33e390
commit e7f4313cf4
4 changed files with 596 additions and 16 deletions
+4 -1
View File
@@ -29,8 +29,11 @@ pub mod timer_wheel;
mod slot;
#[path = "../../src/lock.rs"]
mod lock;
mod mpsc_queue;
mod channel;
pub use event_loop::{Loop, LoopHandle};
pub use event_loop::{Loop, LoopHandle, AddSource, AddTimeout};
pub use event_loop::{LoopData, AddLoopData, TimeoutToken};
pub use readiness_stream::ReadinessStream;
pub use tcp::{TcpListener, TcpStream};
pub use timeout::Timeout;