| 500 | } |
| 501 | |
| 502 | TimeDelta WorkQueue::GetAnAssignment(int thread_id) { |
| 503 | DFAKE_SCOPED_RECURSIVE_LOCK(locked_methods_); |
| 504 | DCHECK_LT(0, task_count_); |
| 505 | assignment_history_[thread_id]++; |
| 506 | if (0 == --task_count_) { |
| 507 | no_more_tasks_.Signal(); |
| 508 | } |
| 509 | return worker_delay_; |
| 510 | } |
| 511 | |
| 512 | void WorkQueue::WorkIsCompleted(int thread_id) { |
| 513 | DFAKE_SCOPED_RECURSIVE_LOCK(locked_methods_); |