Introduce GlobalScope::get_runnable_wrapper

This commit is contained in:
Anthony Ramine 2016-10-04 15:36:20 +02:00
parent ca8c6fb072
commit 514819f37a
4 changed files with 16 additions and 13 deletions

View file

@ -19,6 +19,6 @@ pub trait TaskSource {
-> Result<(), ()>
where T: Runnable + Send + 'static;
fn queue<T: Runnable + Send + 'static>(&self, msg: Box<T>, global: GlobalRef) -> Result<(), ()> {
self.queue_with_wrapper(msg, &global.get_runnable_wrapper())
self.queue_with_wrapper(msg, &global.as_global_scope().get_runnable_wrapper())
}
}