Skip to content

Commit

Permalink
Set the dispatch queue on system layer earlier in startup. (#21859)
Browse files Browse the repository at this point in the history
System layer init wants to use the queue.

Fixes #21857
  • Loading branch information
bzbarsky-apple authored Aug 16, 2022
1 parent cc26cb2 commit fc230cb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/platform/Darwin/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack()
mRunLoopSem = dispatch_semaphore_create(0);

// Ensure there is a dispatch queue available
GetWorkQueue();
static_cast<System::LayerSocketsLoop &>(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue());

// Call _InitChipStack() on the generic implementation base class
// to finish the initialization process.
Expand All @@ -70,8 +70,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack()

mStartTime = System::SystemClock().GetMonotonicTimestamp();

static_cast<System::LayerSocketsLoop &>(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue());

exit:
return err;
}
Expand Down

0 comments on commit fc230cb

Please sign in to comment.