Conversation
Lexer747
force-pushed
the
dev
branch
8 times, most recently
from
August 26, 2025 20:32
deee4d0 to
4b2f1e3
Compare
This patch adds some integration tests for the subcommands. Refactors the shared flags between `drawframe` and `acci-ping` so that they're actually shared and not copy pasted. Finally this patch improves the paint buffer implementation to be thread safe. I'd known about this for a while but more than one go-routine is concurrently reading and writing to same bytes while painting occurs. However from what I could gather from how the program was running this was never an issue because the worst side affect this could cause was a ripped frame being painted. From how I read https://go.dev/ref/mem: > An implementation may always react to a data > race by reporting the race and terminating the > program. At present the race conditions in the current paint buffer implementation don't actually affect anything, the compiler reserves the right to make the current operation of the program un-runnable. Therefore this patch is slightly speculative and more in the spirit of the compilers text rather than it's observed output. Every paint buffer is wrapped with a read-write-mutex and all the bytes buffer functions are re-wrapped and exposed but behind the lock.
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.
This patch adds some integration tests for the subcommands.
Refactors the shared flags between
drawframeandacci-pingso that they're actually shared and not copy pasted.Finally this patch improves the paint buffer implementation to be thread safe. I'd known about this for a while but more than one go-routine is concurrently reading and writing to same bytes while painting occurs. However from what I could gather from how the program was running this was never an issue because the worst side affect this could cause was a ripped frame being painted. From how I read https://go.dev/ref/mem
At present the race conditions in the current paint buffer implementation don't actually affect anything, the compiler reserves the right to make the current operation of the program un-runnable.
Therefore this patch is slightly speculative and more in the spirit of the compilers text rather than it's observed output. Every paint buffer is wrapped with a read-write-mutex and all the bytes buffer functions are re-wrapped and exposed but behind the lock.