capcall

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 2 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 capcall holds the plumbing every sys/... capability package shares: finding the backend interface and running calls on the main thread with tango.ErrNotRunning after the app quit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Async

func Async[T any](a *tango.App, start func(done func(T, error))) (T, error)

Async starts asynchronous native work on the main thread and blocks until it calls done. On the main thread it keeps the event loop running meanwhile — except on Android, where the main thread cannot pump native events: there it fails at once with tango.ErrNestedWait (call from a goroutine instead).

func Backend

func Backend[I any](a *tango.App) (I, error)

Backend returns a's backend as I, or platform.ErrUnsupported.

func Sync

func Sync[T any](a *tango.App, fn func() (T, error)) (T, error)

Sync runs fn on the main thread and returns its result.

Types

This section is empty.

Jump to

Keyboard shortcuts

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