github.com/pubgo/xprocess@v0.1.11/xprocess_future/future.go (about)

     1  package xprocess_future
     2  
     3  import (
     4  	"github.com/pubgo/xprocess/xprocess_abc"
     5  )
     6  
     7  var _ xprocess_abc.Future = (*future)(nil)
     8  
     9  type future struct{ p *promise }
    10  
    11  func (f *future) Yield(data interface{})                               { f.p.yield(data) }
    12  func (f *future) YieldFn(val xprocess_abc.FutureValue, fn interface{}) { f.p.await(val, fn) }