static void unlock(Lock lock, S msg) { if (lock == null) ret; lock.unlock(); vmBus_send unlocked(lock, thread := currentThread()); print("Unlocked: " + msg); // print afterwards to make sure the lock is always unlocked } static void unlock(Lock lock) { if (lock == null) ret; lock.unlock(); vmBus_send unlocked(lock, thread := currentThread()); }