static fltk::Mutex mutex; function() { fltk::Guard guard(mutex); do_stuff; throw_exceptions; if (test()) return; etc; }