In the deconstructor of run_loop.cpp there is an assert that checks to make sure the Scheduler is null before setting it to null. In some rare scenarios where the app is being put into the background or closed the Scheduler can be null before the deconsturctor is called. This can cause an unnecessary crash. Since the goal here is to just set the Scheduler to null either way, it should not matter what the state of the Scheduler is before the function call.
Darwin
The code in the Darwin platform targets Apple platforms but is not specific to iOS or macOS. This code is not distributed as an SDK in itself, but is required by the Mapbox iOS SDK and Mapbox macOS SDK.
These files depend on the Foundation and Core Foundation frameworks but do not depend on iOS- or macOS–specific frameworks, such as UIKit or AppKit. Any non-cross-platform code is guarded by TargetConditionals.h macros.