Open
Description
Line 48 in d843340
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,
Metadata
Assignees
Labels
No labels