Open main menu

CDOT Wiki β

Changes

GPU621/Chapel

252 bytes added, 22:44, 29 November 2022
Task Parallelism
*The begin statement spawns a thread of execution that is independent of the current (main) thread of execution.
writeln("1: ### The begin statement ###");
*The cobegin statement can be used to spawn a block of tasks, one for each statement.
writeln("2: ### The cobegin statement ###");
cobegin {
writeln("2: output from spawned task 1");
writeln("2: output from spawned task 2");
}
= Reference =
73
edits