some useful comments
Vladimir Bauer
8 years ago
| 30 | 30 | priority int |
| 31 | 31 | index int |
| 32 | 32 | |
| 33 | // the flag is set from Progress monitor goroutine only | |
| 33 | // completed is set from master Progress goroutine only | |
| 34 | 34 | completed bool |
| 35 | 35 | |
| 36 | 36 | operateState chan func(*bState) |
| 37 | done chan struct{} | |
| 38 | shutdown chan struct{} | |
| 39 | ||
| 40 | // it's guaranteed that cacheState isn't nil, after done is closed | |
| 37 | // done is closed by Bar's goroutine, after cacheState is written | |
| 38 | done chan struct{} | |
| 39 | // shutdown is closed from master Progress goroutine only | |
| 40 | shutdown chan struct{} | |
| 41 | ||
| 41 | 42 | cacheState *bState |
| 42 | 43 | } |
| 43 | 44 |