4 ms·
One mistake I see a lot is leaving debug that causes sleeps to occur during thread execution. So while it may still be faster than a single thread, the sleeps
by iamNumber4 8y ago
One mistake I see a lot is leaving debug that causes sleeps to occur during thread execution. So while it may still be faster than a single thread, the sleeps slow things down more than it could be.
I see this debug pattern in a lot of tutorials, but no explanation why they show it, and no guidance when to turn it off.
I have also seen bugs that rely on the sleep for functionality to work correctly and have had to fix logic to turn off the sleep. So it is good practice to test production release mode after initial development in dev release mode.