freeable mark the operator that could be freed only poller could do the real free action
(op *FDOperator)
| 63 | // freeable mark the operator that could be freed |
| 64 | // only poller could do the real free action |
| 65 | func (c *operatorCache) freeable(op *FDOperator) { |
| 66 | // reset all state |
| 67 | op.unused() |
| 68 | op.reset() |
| 69 | lock(&c.freelocked) |
| 70 | c.freelist = append(c.freelist, op.index) |
| 71 | unlock(&c.freelocked) |
| 72 | } |
| 73 | |
| 74 | func (c *operatorCache) free() { |
| 75 | lock(&c.freelocked) |