1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-30 04:50:08 +00:00

Breaks Mac machine shutdown deadlock.

This commit is contained in:
Thomas Harte 2018-02-19 16:48:03 -05:00
parent b0ab617393
commit 6aaef97158

View File

@ -16,8 +16,10 @@ struct UpdaterDelegate: public Concurrency::BestEffortUpdater::Delegate {
void update(Concurrency::BestEffortUpdater *updater, int cycles, bool did_skip_previous_update) { void update(Concurrency::BestEffortUpdater *updater, int cycles, bool did_skip_previous_update) {
[delegateLock lock]; [delegateLock lock];
[delegate bestEffortUpdater:nil runForCycles:(NSUInteger)cycles didSkipPreviousUpdate:did_skip_previous_update]; __weak id<CSBestEffortUpdaterDelegate> delegateCopy = delegate;
[delegateLock unlock]; [delegateLock unlock];
[delegateCopy bestEffortUpdater:nil runForCycles:(NSUInteger)cycles didSkipPreviousUpdate:did_skip_previous_update];
} }
}; };