Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit 400f983

Browse files
committed
Implement equivalents to mpsc::channel() and ::sync_channel() for the MainContext
This allows safely sending items from arbitrary threads to the main context and handling them via a callback.
1 parent 0f77d6f commit 400f983

File tree

2 files changed

+455
-0
lines changed

2 files changed

+455
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ pub mod value;
195195
pub mod variant;
196196
mod variant_type;
197197
mod main_context;
198+
#[cfg(any(feature="v2_36", feature = "dox"))]
199+
mod main_context_channel;
200+
#[cfg(any(feature="v2_36", feature = "dox"))]
201+
pub use main_context_channel::{Sender, SyncSender, Receiver};
198202
mod date;
199203
pub use date::Date;
200204
mod value_array;

0 commit comments

Comments
 (0)