new attempt to fix atomic queue lock for TARGET_OS_IS_IPHONE