Implement thread-safe blocking queue | Anthropic Coding Question