Closed kleeon closed 3 months ago
This is not relevant anymore, at least for the test runner, as it's been completely rewritten and the Windows-specific code has been removed.
@Feoramund
I checked it and you are right. Tests seem to be running without any problems now.
Closing the issue.
Version
Context
The following program will hang indefinitely for me:
I rewrote it in the
main
procedure because it was easier to debug, but it also hangs when running throughodin test
. I had to delete//+private
fromrunner.odin
to make this work.It takes a little whilte to hang on my main machine(~10 seconds), but it hangs almost immediately on a slower Core 2 Quad PC.
Output is very inconsistent. Looks like a bug related to race condition:
I'm not 100% sure about this, but I think this might be due to this
win32.ResumeThread
call:https://github.com/odin-lang/Odin/blob/f0ba5d382130800e122776464897671a12f3e7a1/core/testing/runner_windows.odin#L131
The thread doesn't seem to resume properly sometimes and thus
global_threaded_runner_semaphore
never gets signalled.Apparently, it's not a good idea to suspend and resume threads like this:
https://devblogs.microsoft.com/oldnewthing/20031209-00/?p=41573