Hacker News new | ask | show | jobs
by sn41 1818 days ago
You are right. Great work!

One somewhat related theoretical observation about concurrency is in some article by Dijkstra (I don't remember the reference right now): he says that debugging using traces (essentially printf) does not work for concurrency, since it is projecting multidimensional data (data present at the same time in multiple processes) unnecessarily linearized onto a single dimension (a sequence of printfs) and then trying to make sense of what is happening. It may not work, even if you print timestamps.

His view was to promote theoretical proofs of correctness of concurrent code, rather than debugging, but to me at least, this is much more difficult.

1 comments

Very true, and not only do print statements inherently serialized threads, they also change the timing so significantly that probably your bug disappears anyway.
I would expect blazing fast in-memory logging with thread-id and time stamps, so timings aren't affected (much).