2 ms·
Because you can't reliably detect when it happens. For two threads to communicate they have to do some level of synchronization, which will inevitably have some
by lmm 11y ago
Because you can't reliably detect when it happens. For two threads to communicate they have to do some level of synchronization, which will inevitably have some level of performance impact. You can do actual locking (but then you might as well just synchronize the map in the first place) or you can do best-effort communication (which is good enough for warning people about bugs, but not reliable enough for production code).