Skip to content

Commit

Permalink
Merge pull request #74 from semvis123/formatting-sound-position-and-v…
Browse files Browse the repository at this point in the history
…pt-gui

Add formatting to the Objective C files (based on the sound position and vpt gui branch)
  • Loading branch information
Plutoberth authored Jun 24, 2022
2 parents e9cef0b + aa29d72 commit 9a7c14f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Client/macos/MacOSBluetoothConnector.mm
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@ -(void)rfcommChannelData:(IOBluetoothRFCOMMChannel *)rfcommChannel data:(void *)

// tell the other tread that we are done connecting
connectPromise.set_value();

// keep thread running, until we are disconnected
std::unique_lock<std::mutex> lk(macOSBluetoothConnector->disconnectionMutex);
while (macOSBluetoothConnector->running) {
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:.1]];
macOSBluetoothConnector->disconnectionConditionVariable.wait_for(lk, std::chrono::milliseconds(1000), [&]() {
return !macOSBluetoothConnector->running;
});

macOSBluetoothConnector->disconnectionConditionVariable.wait_for(
lk, std::chrono::milliseconds(1000),
[&]() { return !macOSBluetoothConnector->running; });
}

lk.unlock();
Expand Down

0 comments on commit 9a7c14f

Please sign in to comment.