Get returns the task for the given sessionID+taskID, or nil.
(sessionID string, taskID uint32)
| 118 | |
| 119 | // Get returns the task for the given sessionID+taskID, or nil. |
| 120 | func (tm *TaskManager) Get(sessionID string, taskID uint32) *Task { |
| 121 | key := taskKey{sessionID, taskID} |
| 122 | tm.mu.RLock() |
| 123 | defer tm.mu.RUnlock() |
| 124 | return tm.tasks[key] |
| 125 | } |
| 126 | |
| 127 | // ListBySession returns all tasks for a session (any state). |
| 128 | func (tm *TaskManager) ListBySession(sessionID string) []*Task { |
no outgoing calls