311
}
312
313
>
func (d *matcherData) EnqueuePollerAndWait(ctxs []context.Context, poller *waitingPoller) *matchResult {
matcher_data.go
314
>
d.lock.Lock()
315
>
defer d.lock.Unlock()
316
>
317
>
// update this for timeSinceLastPoll
318
>
d.lastPoller = util.MaxTime(d.lastPoller, poller.startTime)
319
>
320
>
// add and look for match
321
>
poller.initMatch(d)
322
>
d.pollers.Add(poller)
323
>
d.findAndWakeMatches()
324
>
325
>
// if already matched, return
326
>
if poller.matchResult != nil {
327
return poller.matchResult
328
}