Skip to content

Commit

Permalink
Set the dispatch queue on system layer earlier in startup. (project-c…
Browse files Browse the repository at this point in the history
…hip#21859)

System layer init wants to use the queue.

Fixes project-chip#21857
  • Loading branch information
bzbarsky-apple authored and isiu-apple committed Sep 16, 2022
1 parent f61f03d commit 903fe2a
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 903fe2a

Please sign in to comment.