| 37 | } |
| 38 | |
| 39 | type lockMap struct { |
| 40 | // Use a lock and a regular map instead of a sync.Cond because some operations, like replace, are not available. |
| 41 | l sync.RWMutex |
| 42 | promises map[interface{}]*entry |
| 43 | |
| 44 | sweepInterval time.Duration |
| 45 | tomb *tomb.Tomb |
| 46 | } |
| 47 | |
| 48 | func (m *lockMap) Wait(key interface{}) Promise { |
| 49 | now := time.Now().UnixNano() |
nothing calls this directly
no outgoing calls
no test coverage detected