• Steven Allen's avatar
    fix: limit use of custom context type · 799bfb3e
    Steven Allen authored
    Goprocess returns a _custom_ context type. Unfortunately, golang has a bunch of
    magic type assertions to efficiently handle built-in context types but launches
    a new goroutine when deriving a new context from a custom context type.
    Otherwise, it has no way to wait on the custom context's channel.
    
    This fix just ensures we only ever have one of goroutines per provide worker by
    deriving a (normal) cancelable context up-front and then using that.
    799bfb3e
workers.go 4.57 KB