Function TaskPool.runTaskH
Runs a new asynchronous task in a worker thread, returning the task handle.
Task runTaskH(FT, ARGS...)
(
FT func,
auto ref ARGS args
)
if (isFunctionPointer!FT && isNothrowCallable!(FT, ARGS));
Task runTaskH(alias method, T, ARGS...)
(
shared(T) object,
auto ref ARGS args
)
if (isNothrowMethod!(shared(T), method, ARGS));
Task runTaskH(FT, ARGS...)
(
TaskSettings settings,
FT func,
auto ref ARGS args
)
if (isFunctionPointer!FT && isNothrowCallable!(FT, ARGS));
Task runTaskH(alias method, T, ARGS...)
(
TaskSettings settings,
shared(T) object,
auto ref ARGS args
)
if (isNothrowMethod!(shared(T), method, ARGS));
This function will yield and wait for the new task to be created and started in the worker thread, then resume and return it.
Only function pointers with weakly isolated arguments are allowed to be able to guarantee thread-safety.