enforceMainThread
fn
void enforceMainThread(string operation = "FLTK operation")Enforces that the current thread is the main thread.
Call this at the start of functions that must only run on the main thread. In release builds, this is a no-op for performance.
Parameters
operation | Description of the operation (for error message) |
Throws
FltkException if not on main thread (debug only)