Timeout management for queue polling