yyc_run_in_thread

function

yyc_run_in_thread(_func[, _arg])

Description

Runs a function in a separate thread.

Arguments

Name Type Description
_func func The function to run.
_arg any An argument for the function. Defaults to undefined.

Throws

Example

yyc_run_in_thread(function (_timeout) {
    var _t = current_time;
    while (current_time - _t < _timeout) {}
    show_debug_message("Slept for " + string(_timeout) + "ms!");
}, 1000);
Do you find this page helpful?

Copyright © 2021, Patrik Kraif. Built on October 14, 2021 using GMDoc.