cog
cog copied to clipboard
Tight loop causes redis worker to consume entire CPU while waiting for messages
The loop here takes a full CPU while async polling for messages from Redis: https://github.com/replicate/cog/blob/main/python/cog/server/redis_queue.py#L223-L224
Can we do this with a blocking pop instead?