Decouple Tape Browser updates from emulation pause#46
Open
morozov wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problems solved
pilot_length = 1084 Tand a pulse count of mostly 16. That comes to about 5 ms total, and the blocks are meant to play as a single whole.What this PR does
Removes both pause wraps from the Cocoa Tape Browser — the one inside
ui_tape_browser_updateand the one aroundTapeBrowserController.showWindow:. The browser's UI updates already dispatch asynchronously to the main thread, so neither wrap is load-bearing on Cocoa; they're vestiges of the original GTK1 single-threaded design. The previously-synchronous cross-threadsetDocumentEdited:call becomes asetDocumentEditedFlag:main-thread dispatch so the function is thread-correct end-to-end, and theNEW_TAPEwalk (the only branch that iteratestape->blocksdirectly) is dispatched onto the emulator thread viaperformSelector:onThread:— the same thread where save-trap and RZX block appends fire — so list iteration and mutation are serialised on a single thread.setTapeIndex:now calls-scrollRowToVisible:after-setSelectionIndex:so the highlighted current block stays visible as playback advances.