async

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendAsyncJob

func AppendAsyncJob(group string, routine AsyncRoutine, callback AsyncCallback)

AppendAsyncJob append an async job to be executed asyncly (not in the game goroutine)

func WaitClear

func WaitClear() bool

WaitClear wait for all async job workers to finish (should only be called in the game goroutine)

Types

type AsyncCallback

type AsyncCallback func(res interface{}, err error)

AsyncCallback is a function which will be called after async job is finished with result and error

type AsyncRoutine

type AsyncRoutine func() (res interface{}, err error)

AsyncRoutine is a function that will be executed in the async goroutine and its result and error will be passed to AsyncCallback

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL