You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The jobHandler used e.g. by Conn.StartUnitContext blocks for ever if nothing reads from the provided channel.
I think this write to the result channel should be non-blocking, like this:
c.jobListener.Lock()
out, ok := c.jobListener.jobs[job]
if ok {
select {
case out <- result:
default:
fmt.Println("failed to write result to job channel")
}
delete(c.jobListener.jobs, job)
}
c.jobListener.Unlock()
I'm not sure, what is the best way to log something or if it's even necessary,