You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `test_threads` command used to display a seemingly random list
of variable number of As and Bs.
This was due to the fact that the `write!` macro internally makes
IPC calls, which reschedules the thread, while it is still holding
the lock.
When the concurrent threads gets to run, it sees that the lock is
held, so it does nothing and skips its turn silently.
We now make sure that every thread prints exactly 10 times,
not counting the rounds that are skipped.
This closessunriseos#224
It appears to only runs thread A for some reason. The output of thread b is missing.
The text was updated successfully, but these errors were encountered: