run


Description:

[ 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();
}
});

Parameters:

func

a task function to execute

Returns:

a future of the execution

See also:

Gpseq.run




2022 vala-language.org