native

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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

func NewBackend() platform.Backend

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL