libextra: Another round of de-Cell-ing.

34 uses of `Cell` remain.
This commit is contained in:
Patrick Walton 2013-12-03 16:44:16 -08:00
parent 5aad292fb9
commit 786dea207d
35 changed files with 211 additions and 387 deletions

View file

@ -37,15 +37,13 @@ The executing thread has no access to a task pointer and will be using
a normal large stack.
*/
pub fn run_in_bare_thread(f: proc()) {
use cell::Cell;
use rt::thread::Thread;
let f_cell = Cell::new(f);
let (port, chan) = comm::stream();
// FIXME #4525: Unfortunate that this creates an extra scheduler but it's
// necessary since rust_raw_thread_join is blocking
do task::spawn_sched(task::SingleThreaded) {
Thread::start(f_cell.take()).join();
Thread::start(f).join();
chan.send(());
}
port.recv();