_go

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Contains runner for native Go callbacks within JOM.

This is a fairly stripped down version of a script package due to there not being any VM to get and set values from/to.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCallback

func RunCallback(code code.Code, jsonMap json_map.JsonMapInt) (data json_map.JsonMapInt, err error)

Runs a Go callback.

Callback must have the signature:

func(json json_map.JsonMapInt)

Otherwise RunCallback will panic.

Halting Problem

The given callback within code will be wrapped in a goroutine which will push an interrupt once the callback has finished. If the callback doesn't finish within globals.HaltingDelay seconds a separate goroutine will push the interrupt which will cause RunCallback to return early.

Note: If a halting problem issue occurs then there will be a goroutine running the callback until it has finished, which may be never. Keep this in mind if you have a long running program which utilises native Go callback execution.

Types

This section is empty.

Jump to

Keyboard shortcuts

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