(maxPending int)
| 39 | } |
| 40 | |
| 41 | func newKeyScheduler(maxPending int) *keyScheduler { |
| 42 | s := &keyScheduler{ |
| 43 | lanes: make(map[string]*scheduleLane), |
| 44 | maxPending: maxPending, |
| 45 | accepting: true, |
| 46 | } |
| 47 | s.cond = sync.NewCond(&s.mux) |
| 48 | return s |
| 49 | } |
| 50 | |
| 51 | func (s *keyScheduler) enqueue(req *invocationRequest) error { |
| 52 | if req == nil || req.fn == nil || req.fn.UID == "" || req.scheduleKey == "" { |
no outgoing calls
searching dependent graphs…