github.com/pubgo/xprocess@v0.1.11/future.go (about) 1 package xprocess 2 3 import ( 4 "github.com/pubgo/xprocess/xprocess_abc" 5 "github.com/pubgo/xprocess/xprocess_future" 6 ) 7 8 type FutureValue = xprocess_abc.FutureValue 9 type IPromise = xprocess_abc.IPromise 10 type Value = xprocess_abc.Value 11 12 func Async(fn interface{}, args ...interface{}) xprocess_abc.FutureValue { 13 return xprocess_future.Async(fn, args...) 14 } 15 16 func Await(val xprocess_abc.FutureValue, fn interface{}) xprocess_abc.FutureValue { 17 return xprocess_future.Await(val, fn) 18 } 19 20 func Promise(fn func(g xprocess_abc.Future)) xprocess_abc.IPromise { return xprocess_future.Promise(fn) }