SetChunkState sets the 2-bit state for a specific chunk index (thread-safe)
(index int, status ChunkStatus)
| 383 | |
| 384 | // SetChunkState sets the 2-bit state for a specific chunk index (thread-safe) |
| 385 | func (ps *ProgressState) SetChunkState(index int, status ChunkStatus) { |
| 386 | ps.mu.Lock() |
| 387 | defer ps.mu.Unlock() |
| 388 | ps.setChunkState(index, status) |
| 389 | } |
| 390 | |
| 391 | // setChunkState sets the 2-bit state (internal, expects lock) |
| 392 | func (ps *ProgressState) setChunkState(index int, status ChunkStatus) { |