ipld-eth-server/vendor/github.com/jbenet/goprocess/context/derive.go
Elizabeth Engelman 36533f7c3f Update vendor directory and make necessary code changes
Fixes for new geth version
2019-09-25 16:32:27 -05:00

20 lines
538 B
Go

package goprocessctx
import (
"context"
goprocess "github.com/jbenet/goprocess"
)
// OnClosingContext derives a context from a given goprocess that will
// be 'Done' when the process is closing
func OnClosingContext(p goprocess.Process) context.Context {
return WithProcessClosing(context.Background(), p)
}
// OnClosedContext derives a context from a given goprocess that will
// be 'Done' when the process is closed
func OnClosedContext(p goprocess.Process) context.Context {
return WithProcessClosed(context.Background(), p)
}