concur

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package concur provides calling functions in separate goroutines and signalling their termination, optionally passing any result asynchronously back via channels.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseWhenGone

func CloseWhenGone(fn func()) chan Nothing

CloseWhenGone calls the passed function in its own new goroutine, closing the returned (buffered) channel after the called function has returned or panicked.

func PassWhenGone

func PassWhenGone[T any](fn func() T) chan T

PassWhenGone calls the passed function in its own new goroutine, passing its result via the returned (buffered) channel that then gets closed. If the called function panics, the returned channel is closed without producing any result.

Types

type Nothing

type Nothing = nothing.Nothing

Nothing should actually not be stuttering.

Jump to

Keyboard shortcuts

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