Documentation
¶
Index ¶
- func Async(fn interface{}, args ...interface{}) xprocess_abc.FutureValue
- func Await(val xprocess_abc.FutureValue, fn interface{}) xprocess_abc.FutureValue
- func Break()
- func Go(fn func(ctx context.Context)) context.CancelFunc
- func GoDelay(dur time.Duration, fn func(ctx context.Context)) context.CancelFunc
- func GoLoop(fn func(ctx context.Context)) context.CancelFunc
- func Map(data interface{}, fn interface{}) interface{}
- func NewEvent() *xprocess_event.Event
- func NewGroup(c ...uint16) *xprocess_group.Group
- func Promise(fn func(g xprocess_abc.Future)) xprocess_abc.IPromise
- func Timeout(dur time.Duration, fn func(ctx context.Context)) error
- type WaitGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Async ¶ added in v0.1.1
func Async(fn interface{}, args ...interface{}) xprocess_abc.FutureValue
func Await ¶ added in v0.1.1
func Await(val xprocess_abc.FutureValue, fn interface{}) xprocess_abc.FutureValue
func GoLoop ¶
func GoLoop(fn func(ctx context.Context)) context.CancelFunc
GoLoop 启动一个goroutine loop 是为了替换 `go func() {for{ }}()` 这类的代码
func NewEvent ¶ added in v0.1.2
func NewEvent() *xprocess_event.Event
func NewGroup ¶
func NewGroup(c ...uint16) *xprocess_group.Group
func Promise ¶ added in v0.1.1
func Promise(fn func(g xprocess_abc.Future)) xprocess_abc.IPromise
Types ¶
type WaitGroup ¶ added in v0.1.1
type WaitGroup = xprocess_waitgroup.WaitGroup
func NewWaitGroup ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.