Documentation
¶
Index ¶
- Variables
- type Continuation
- func (c *Continuation) Call(local interface{}) (*Frame, error)
- func (c *Continuation) CallStep(step int, local interface{}) (*Frame, error)
- func (c *Continuation) Dump(frame *Frame) ([]byte, error)
- func (c *Continuation) NewFrame(step int, local interface{}) *Frame
- func (c *Continuation) Restore(data []byte) error
- func (c *Continuation) Resume(frame *Frame)
- func (c *Continuation) Segment(segment Segment) *Continuation
- func (c *Continuation) Sleep(frame *Frame) (result interface{}, err error)
- func (c *Continuation) Wait(frame *Frame) (status FrameMessage, result interface{}, err error)
- type Frame
- type FrameMessage
- type Segment
Constants ¶
This section is empty.
Variables ¶
View Source
var AlreadyDoneError = errors.New("already done")
已经执行完成
Functions ¶
This section is empty.
Types ¶
type Continuation ¶
type Continuation struct {
// contains filtered or unexported fields
}
func (*Continuation) CallStep ¶
func (c *Continuation) CallStep(step int, local interface{}) (*Frame, error)
调用指定分段的函数
func (*Continuation) NewFrame ¶
func (c *Continuation) NewFrame(step int, local interface{}) *Frame
创建新的帧栈
func (*Continuation) Sleep ¶
func (c *Continuation) Sleep(frame *Frame) (result interface{}, err error)
休眠
func (*Continuation) Wait ¶
func (c *Continuation) Wait(frame *Frame) (status FrameMessage, result interface{}, err error)
等待执行结果
type FrameMessage ¶
type FrameMessage int
const ( FrameStatusSleep FrameMessage = iota FrameStatusYield FrameStatusNext FrameStatusReturn FrameStatusThrow )
Click to show internal directories.
Click to hide internal directories.