d2thread

package
v0.0.0-...-7f92c57 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package d2thread is a package graciously taken from https://github.com/faiface/mainthread

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(f func())

Call queues function f on the main thread and blocks until the function f finishes.

func CallErr

func CallErr(f func() error) error

CallErr queues function f on the main thread and returns an error returned by f.

func CallNonBlock

func CallNonBlock(f func())

CallNonBlock queues function f on the main thread and returns immediately. Does not wait until f finishes.

func CallVal

func CallVal(f func() interface{}) interface{}

CallVal queues function f on the main thread and returns a value returned by f.

func Run

func Run(run func())

Run enables mainthread package functionality. To use mainthread package, put your main function code into the run function (the argument to Run) and simply call Run from the real main function.

Run returns when run (argument) function finishes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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