mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-05 08:26:28 +00:00
Added precaution to make sure best-effort updaters aren't mid-update during document destruction.
This commit is contained in:
@@ -92,6 +92,7 @@ class MachineDocument:
|
||||
}
|
||||
|
||||
override func close() {
|
||||
bestEffortUpdater.flush()
|
||||
actionLock.lock()
|
||||
drawLock.lock()
|
||||
openGLView.invalidate()
|
||||
|
@@ -25,5 +25,6 @@
|
||||
@property (nonatomic, weak) id<CSBestEffortUpdaterDelegate> delegate;
|
||||
|
||||
- (void)update;
|
||||
- (void)flush;
|
||||
|
||||
@end
|
||||
|
@@ -63,4 +63,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)flush
|
||||
{
|
||||
dispatch_sync(_serialDispatchQueue, ^{});
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user