Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running a game in two windows at the same time is a problem #168

Open
erkyrath opened this issue Sep 30, 2024 · 0 comments
Open

Running a game in two windows at the same time is a problem #168

erkyrath opened this issue Sep 30, 2024 · 0 comments

Comments

@erkyrath
Copy link
Owner

They'll both write to the transcript file, interleaving outputs. In fact I think it's possible for two outputs to get interleaved piecewise, which would corrupt the JSON stream. (Unix appends are not really guaranteed atomic.)

In any case it's not what the user wants. We should apply some logic to prevent this. I'm not sure what it would be, though. Maybe just disallow the user from doing this (opening two windows on the same game) in the first place.

Better answer: disallow the second window from using autosave. (Two live games shouldn't share an autosave directory either.) If there's no autosave, the second window will get a unique session ID and thus a separate transcript file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant