Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoopThread ¶ added in v2.1.0
type NoopThread struct{}
NoopThread is used to disable threading.
func NewNoopThread ¶ added in v2.1.0
func NewNoopThread() *NoopThread
NewNoopThread creates a new thread that does no threading.
func (*NoopThread) Call ¶ added in v2.1.0
func (t *NoopThread) Call(f func())
Call executes the func immediately.
func (*NoopThread) CallAsync ¶ added in v2.6.0
func (t *NoopThread) CallAsync(f func())
CallAsync executes the func immediately.
type OSThread ¶ added in v2.1.0
type OSThread struct {
// contains filtered or unexported fields
}
OSThread represents an OS thread.
func NewOSThread ¶ added in v2.1.0
func NewOSThread() *OSThread
NewOSThread creates a new thread.
queueSize indicates the function queue size. This matters when you use CallAsync.
func (*OSThread) Call ¶ added in v2.1.0
func (t *OSThread) Call(f func())
Call calls f on the thread.
Do not call Call from the same thread. Call would block forever.
Call blocks if Loop is not called.
Click to show internal directories.
Click to hide internal directories.