Put ranges data to filename
(filename string, data []byte)
| 69 | |
| 70 | // Put ranges data to filename |
| 71 | func (this *PartialRangesQueue) Put(filename string, data []byte) { |
| 72 | var index = this.indexForKey(filename) |
| 73 | |
| 74 | this.mu[index].Lock() |
| 75 | this.m[index][filename] = data |
| 76 | this.mu[index].Unlock() |
| 77 | |
| 78 | // always wait to finish |
| 79 | this.c <- filename |
| 80 | } |
| 81 | |
| 82 | // Get ranges data from filename |
| 83 | func (this *PartialRangesQueue) Get(filename string) ([]byte, error) { |
nothing calls this directly
no test coverage detected