mutex-condition-3 often fails on Windows
* https://github.com/tcltk/tcl/actions/runs/20001593544/job/57357640381
* https://github.com/tcltk/tcl/actions/runs/20021820910/job/57410165607
Those are the Windows builds on December 7 and 8
I don't think there's something wrong with mutexes on Windows (at least not with the Tcl wrappers around the Windows API). But this testcase tests a OS implementation, whether it assigns time reasonably between threads. Tcl should not test that, it's not Tcl's responsibility, therefore I suggest to mark this testcase as "nonPortable"
4cbb008880(backport) Bug [982651f543] - Remove test for mutex thread fairness as not guaranteed by OS. Timeouts suffice to ensure no deadlocks. check-in2025-12-15 08:56:48db598cbe2fBug [982651f543] - Remove test for mutex thread fairness as not guaranteed by OS. Timeouts suffice to ensure no deadlocks. check-in2025-12-14 15:42:57
You're right in that the Microsoft documentation explicitly says there are no guarantees as to the threads that are woken up and granted the lock. And if the last run thread is the winner more often than not, it's possible the "fairness" test will fail.
What I was trying to ensure for the most part that no thread gets permanently blocked. Let me see if there is a better way to verify that. Until then, I'll mark it as nonPortable.
Removed the fairness check as the timeout counts are suffice to track deadlocks. Keeping open until CI runs.