[ Version ( since = "0.4.0-alpha" ) ]
public Future<void*> run (owned VoidTaskFunc func)
Increases the counter by one and schedules the given function to execute. Next, decreases the counter by one after the function is executed.
This is equivalent to:
waitgroup.add();
return Gpseq.run(() => {
try {
func();
} catch (Error err) {
throw err;
} finally {
waitgroup.done();
}
});
func |
a task function to execute |
a future of the execution |