Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncTask ¶
type AsyncTask struct {
// contains filtered or unexported fields
}
func GetNamedAsyncTask ¶
func (*AsyncTask) Post ¶
func (t *AsyncTask) Post(tasks ...IAsyncTask)
Example ¶
asyncTask, err := GetNamedAsyncTask("async.task.test", 3, 3, func(err error) { fmt.Println("Run err", err.Error()) }) if err != nil { println("err", err.Error()) return } asyncTask.Post(newTestTask("hello"), newTestTask("err")) asyncTask.Close()
Output: Run err wo qu err le
type IAsyncTask ¶
type IAsyncTask interface {
Run() error
}
Click to show internal directories.
Click to hide internal directories.