Finally something that works without race conditions