Zannick / logic-graph

Tools for video game logic representation and analysis, particularly routing and beatability checks for speedruns and randomizers.
MIT License
3 stars 0 forks source link

Sometimes the greedy thread never starts #95

Closed Zannick closed 1 year ago

Zannick commented 1 year ago

That's set now using a move lambda in a for loop... but there's some sort of race condition early on that prevents it from working.

Zannick commented 1 year ago

This appears to be due to https://github.com/Zannick/logic-graph/blob/cecc20362366f640fd56cc311b09d83274682b71/analyzer/src/algo.rs#L636-L638

in which the worker threads exit upon processing a state that gets no new results to add, rather than mark themselves apparently done and wait for all threads to agree. Occasionally this means the greedy thread exits immediately. Other times it means we end up with only one thread running (in one case it was SomeProgress(3) and that resulted in a glut of entries at progress level 4.