3 ms·
What about when you want shared memory between threads? Sure a pipe works in the unidirectional case, but what if you need to communicate back? Signals are a t
by cozzyd 6y ago
What about when you want shared memory between threads?
Sure a pipe works in the unidirectional case, but what if you need to communicate back? Signals are a thing, but they're worse than threads. Multiple processes and shm_open is a thing, but is that really easier than multithreading? (You still need mutexes, and such, but now they're across processes... yuck!).
Also, for many use cases, "#pragma omp parallel for" is often easier than anything else.