@@ -129,15 +129,15 @@ impl GreenTask {
129
129
/// and will not have any contained Task structure.
130
130
pub fn new ( stack_pool : & mut StackPool ,
131
131
stack_size : Option < uint > ,
132
- start : proc ( ) ) -> ~GreenTask {
132
+ start : proc ( ) : Send ) -> ~GreenTask {
133
133
GreenTask :: new_homed ( stack_pool, stack_size, AnySched , start)
134
134
}
135
135
136
136
/// Creates a new task (like `new`), but specifies the home for new task.
137
137
pub fn new_homed ( stack_pool : & mut StackPool ,
138
138
stack_size : Option < uint > ,
139
139
home : Home ,
140
- start : proc ( ) ) -> ~GreenTask {
140
+ start : proc ( ) : Send ) -> ~GreenTask {
141
141
// Allocate ourselves a GreenTask structure
142
142
let mut ops = GreenTask :: new_typed ( None , TypeGreen ( Some ( home) ) ) ;
143
143
@@ -175,7 +175,7 @@ impl GreenTask {
175
175
/// new stack for this task.
176
176
pub fn configure ( pool : & mut StackPool ,
177
177
opts : TaskOpts ,
178
- f : proc ( ) ) -> ~GreenTask {
178
+ f : proc ( ) : Send ) -> ~GreenTask {
179
179
let TaskOpts {
180
180
notify_chan, name, stack_size,
181
181
stderr, stdout,
@@ -443,7 +443,7 @@ impl Runtime for GreenTask {
443
443
}
444
444
}
445
445
446
- fn spawn_sibling ( mut ~self , cur_task : ~Task , opts : TaskOpts , f : proc ( ) ) {
446
+ fn spawn_sibling ( mut ~self , cur_task : ~Task , opts : TaskOpts , f : proc ( ) : Send ) {
447
447
self . put_task ( cur_task) ;
448
448
449
449
// Spawns a task into the current scheduler. We allocate the new task's
@@ -490,7 +490,7 @@ mod tests {
490
490
use super :: super :: { PoolConfig , SchedPool } ;
491
491
use super :: GreenTask ;
492
492
493
- fn spawn_opts ( opts : TaskOpts , f : proc ( ) ) {
493
+ fn spawn_opts ( opts : TaskOpts , f : proc ( ) : Send ) {
494
494
let mut pool = SchedPool :: new ( PoolConfig {
495
495
threads : 1 ,
496
496
event_loop_factory : :: rustuv:: event_loop,
0 commit comments