2 ms·
Regardless it does not always do what they want. Let's say each of 100 tasks has a 50% chance of stalling for 30 seconds and 50% chance of taking 0.01 seconds,
by Retric 17y ago
Regardless it does not always do what they want.
Let's say each of 100 tasks has a 50% chance of stalling for 30 seconds and 50% chance of taking 0.01 seconds, and then they need access to one of 3 resources. If the stall is totally random then the request for the resource does not happen until after a random number of threads finishes.
Writing multi-core code does not have to be hard, but you can't abstract away the problem. You need to understand the dependency flows and code around them.