Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(run func())
Init initializes the functionality for running arbitrary subsequent functions on the main system thread.
Init must be called in the main package.
Example ¶
package main import ( "fmt" "changkun.de/x/pkg/maint" ) func main() { maint.Init(func() { maint.Call(func() { fmt.Println("from main thread") }) }) }
Output: from main thread
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.