Unlike std::condition_variable, we return ETIMEDOUT when time expires rather than std::timeout
| 80 | // Unlike std::condition_variable, we return ETIMEDOUT when time expires |
| 81 | // rather than std::timeout |
| 82 | int wait_for(std::unique_lock<bthread::Mutex>& lock, |
| 83 | long timeout_us) { |
| 84 | return wait_until(lock, butil::microseconds_from_now(timeout_us)); |
| 85 | } |
| 86 | |
| 87 | int wait_for(std::unique_lock<bthread_mutex_t>& lock, |
| 88 | long timeout_us) { |