pub unsafe extern "C-unwind" fn Byond_ThreadSync(
callback: ByondCallback,
data: *mut c_void,
block: bool,
) -> CByondValue
Expand description
Runs a function as a callback on the main thread (or right away if already there) Blocking is optional. If already on the main thread, the block parameter is meaningless.
§Arguments
callback
- Function pointer to CByondValue function(void*)data
- Void pointer (argument to function)block
- True if this call should block while waiting for the callback to finish; false if not
§Returns
CByondValue returned by the function (if it blocked; null if not)