()
| 86 | } |
| 87 | |
| 88 | func NewThreadState() *ThreadState { |
| 89 | return &ThreadState{ |
| 90 | currentState: Reserved, |
| 91 | subscribers: []stateSubscriber{}, |
| 92 | mu: sync.RWMutex{}, |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | func (ts *ThreadState) Is(state State) bool { |
| 97 | ts.mu.RLock() |
no outgoing calls
no test coverage detected