2 ms·
One observation I'd like to make is that feeding a thread farm from a single input stream demands some understanding of locks, queues and mutex. The examples a
by ggm 3y ago
One observation I'd like to make is that feeding a thread farm from a single input stream demands some understanding of locks, queues and mutex.
The examples are a bit piss weak/simple. One master and one slave. Really I expected 3-4 consumers so you can understand how they interact over q.put() and q.get() and q.join() and q.task_done()
On a large(ish) memory and core host using dnspython I've been getting significantly more dns throughout over log file processing and a dict() cache shared amongst the threads avoiding dns stalls. 20+ threads. It's still buggy, better examples would be helpful.
I know: threads not processes. They're documented as neighbour concepts. I'd have done process forking if I could find good lock and shared mem/mmap use Documented.