package puddle

import (
	
	
)

// valueCancelCtx combines two contexts into one. One context is used for values and the other is used for cancellation.
type valueCancelCtx struct {
	valueCtx  context.Context
	cancelCtx context.Context
}

func ( *valueCancelCtx) () (time.Time, bool) { return .cancelCtx.Deadline() }
func ( *valueCancelCtx) () <-chan struct{}       { return .cancelCtx.Done() }
func ( *valueCancelCtx) () error                  { return .cancelCtx.Err() }
func ( *valueCancelCtx) ( any) any           { return .valueCtx.Value() }

func (,  context.Context) context.Context {
	return &valueCancelCtx{
		valueCtx:  ,
		cancelCtx: ,
	}
}