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