import "task/task";
ComputeTask allows to run computation code in parallel on multiple CPU cores.
static function create(): ComputeTask
static function create(finish_data): ComputeTask
virtual function process(): Dynamicfinish function
in the main thread.
virtual function finish(data, result)function run()finish functions for any
finished tasks.
static function run(process_func, process_data)
static function run(process_func, process_data, finish_func, finish_data)
process function in the computation thread, passing the result
back to finish function in the main thread.
static function check_finished()finish functions.
static function finish_all()finish functions.
static function get_core_count(): Integer
static function run_parallel(start: Integer, end: Integer, func, data)
static function run_parallel(start: Integer, end: Integer, min_iters: Integer, func, data)
function func(data, from: Integer, to: Integer, core_id: Integer)from and to represent a subinterval for given CPU core (end is exclusive).