return true if the counter is complete
| 73 | |
| 74 | // return true if the counter is complete |
| 75 | bool SetTotal(int total) { |
| 76 | total_.store(total); |
| 77 | if (count_.load() != total) return false; |
| 78 | return DoneOnce(); |
| 79 | } |
| 80 | |
| 81 | // return true if the counter has not already been completed |
| 82 | bool Cancel() { return DoneOnce(); } |