5 ms·
For concurrency issues you don't want a debugger or printing as both are terrible for this, you want a library designed to specifically detect these issues, I h
by TinkersW 2y ago
For concurrency issues you don't want a debugger or printing as both are terrible for this, you want a library designed to specifically detect these issues, I have a custom one but many other people use valgrind etc.
- lolinder 2y agoThis depends a lot on your stack. If we're talking about concurrency issues in a multi-threaded systems-level program, you're probably right and I can't speak to that. But as a web developer when I talk about concurrency issues I'm usually talking about race conditions between network requests and/or user input, and print works fine for those. The timings at fault are large enough that the microscopic overhead of print doesn't change them meaningfully.