1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-06 01:28:57 +00:00

Added precaution to make sure best-effort updaters aren't mid-update during document destruction.

This commit is contained in:
Thomas Harte 2016-10-16 22:14:47 -04:00
parent 61ad0f8bdc
commit b274d7008c
3 changed files with 7 additions and 0 deletions

View File

@ -92,6 +92,7 @@ class MachineDocument:
}
override func close() {
bestEffortUpdater.flush()
actionLock.lock()
drawLock.lock()
openGLView.invalidate()

View File

@ -25,5 +25,6 @@
@property (nonatomic, weak) id<CSBestEffortUpdaterDelegate> delegate;
- (void)update;
- (void)flush;
@end

View File

@ -63,4 +63,9 @@
}
}
- (void)flush
{
dispatch_sync(_serialDispatchQueue, ^{});
}
@end