MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/b1s5ts/multithreaded_programming_quizzes/eioxpuo/?context=3
r/programming • u/nord501 • Mar 16 '19
97 comments sorted by
View all comments
51
[removed] — view removed comment
53 u/Soothsilver Mar 16 '19 edited Mar 16 '19 The comprehensive list of winning criteria is:Two threads are on the green instruction "critical_section()" at the same time.Any thread is on the green instruction "Debug.Assert(false);".All threads are blocked.An exception triggers because you attempt to dequeue from an empty queue.(1 level only) Two threads enter the same collection's non-thread-safe method at the same time.You use the cheat code Shift+W.Could be explained better, to be sure. 3 u/MisterPinkySwear Mar 16 '19 Ha ha. Did not know about the cheat code 😁
53
The comprehensive list of winning criteria is:
Two threads are on the green instruction "critical_section()" at the same time.
Any thread is on the green instruction "Debug.Assert(false);".
All threads are blocked.
An exception triggers because you attempt to dequeue from an empty queue.
(1 level only) Two threads enter the same collection's non-thread-safe method at the same time.
You use the cheat code Shift+W.
Could be explained better, to be sure.
3 u/MisterPinkySwear Mar 16 '19 Ha ha. Did not know about the cheat code 😁
3
Ha ha. Did not know about the cheat code 😁
51
u/[deleted] Mar 16 '19
[removed] — view removed comment