std.concurrency.scheduler.spawn
- multiple declarations
- Function Scheduler.spawn
- Function Scheduler.spawn
Function Scheduler.spawn
Assigns a logical thread to execute the supplied op
.
This routine is called by spawn
. It is expected to instantiate a new
logical thread and run the supplied operation. This thread must call
thisInfo.cleanup() when the thread terminates if the scheduled thread
is not a kernel thread--all kernel threads will have their ThreadInfo
cleaned up automatically by a thread-local destructor.
Prototype
abstract void spawn( void delegate() op );
Parameters
Name | Description |
---|---|
op | The function to execute. This may be the actual function passed
by the user to spawn itself, or may be a wrapper function. |
Function Scheduler.spawn
Assigns a logical thread to execute the supplied op
.
This routine is called by spawn
. It is expected to instantiate a new
logical thread and run the supplied operation. This thread must call
thisInfo.cleanup() when the thread terminates if the scheduled thread
is not a kernel thread--all kernel threads will have their ThreadInfo
cleaned up automatically by a thread-local destructor.
Prototype
abstract void spawn( void delegate() op );
Parameters
Name | Description |
---|---|
op | The function to execute. This may be the actual function passed
by the user to spawn itself, or may be a wrapper function. |
Authors
Sean Kelly, Alex Rønne Petersen, Martin Nowak