After a conversation with @fnichol we decided it would be better to use channels to pass work around here so we aren't hammering pop() in a bunch of threads and are instead just polling for work. We should be just as fast (if not faster) under load, but we'll be a lot quieter when sitting still. We limit total threads using a semaphore so we will block work until new slots appear.
After a conversation with @fnichol we decided it would be better to use channels to pass work around here so we aren't hammering
pop()
in a bunch of threads and are instead just polling for work. We should be just as fast (if not faster) under load, but we'll be a lot quieter when sitting still. We limit total threads using a semaphore so we will block work until new slots appear.