Implement first (rough) cut global locking for Scratch-style threading