Skip to content

Conversation

@MrBlockers
Copy link
Contributor

This fixes #1320, but not #1239. The root cause for the avalanche of messages is due to how the refresh timer system calls GenerateAll. When GenerateAll is called by Refresh, if a Message occurs, that Message will block GenerateAll. It doesn't block subsequent calls from the timer to Refresh (presumably from a separate thread). Because the "scheduledGenerateAll" flag is not cleared until after the generation is unblocked, each following refresh triggers another call to GenerateAll. By reversing the flag clear and call, it breaks the cycle. I don't think this matters for scheduledShowTW, but I updated it as well.

I am going to look into what might be causing #1239 next, but I think it is due to something unrelated.

P.S. I am still getting my bearings on the codebase, so please nitpick away!

This fixes solvespace#1320. The root cause for the avalanche of
messages is due to how the refresh timer system calls GenerateAll. When
GenerateAll is called by Refresh, if a Message occurs, that Message will
block GenerateAll. It _doesn't_ block subsequent calls from the timer to
Refresh (presumably from a separate thread). Because the
"scheduledGenerateAll" flag is not cleared until after the generation is
unblocked, each following refresh triggers another call to GenerateAll.
By reversing the flag clear and call, it breaks the cycle. I don't think
this matters for scheduledShowTW, but I updated it as well.
@ruevs
Copy link
Member

ruevs commented Jan 29, 2023

Thank you. I'll look at this when I'm on a PC and have some thime. More related discussions #914, #1257, #1143, #920

@ruevs ruevs self-requested a review January 29, 2023 02:35
@phkahler
Copy link
Member

phkahler commented Feb 1, 2023

I don't have the problem on Linux, but the patch doesn't seem to break anything. It looks like it shouldn't break anything too, so that's good.

@phkahler phkahler removed their request for review February 1, 2023 00:43
@phkahler phkahler merged commit d6e9709 into solvespace:master Feb 3, 2023
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

Successfully merging this pull request may close these issues.

message box apocalypse on split lines when endpoint is on line

3 participants