Documentation
¶
Overview ¶
Package native picks the platform backend for the GOOS being built and holds the per-platform main-thread rules the core follows. Package tango reaches the platform backends only through this package.
It imports only internal/platform and the backend packages, never the root package.
Index ¶
Constants ¶
const RunOwnsMainThread = true
RunOwnsMainThread reports whether App.Run executes on the platform's main (UI) thread: on desktop the native loop runs inside Run. See thread_mobile.go for mobile.
Variables ¶
This section is empty.
Functions ¶
func MainGoroutine ¶
func MainGoroutine() uint64
MainGoroutine returns the id of the goroutine the native host started main.main on, or 0 if not known. Only meaningful on mobile: on desktop main.main runs on the goroutine that ran package initialization, which the core records itself.
func NewBackend ¶
NewBackend returns a new backend of the platform being built, or nil on platforms without one (App.Run then returns ErrNoBackend).
Types ¶
This section is empty.