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 ¶
Click to show internal directories.
Click to hide internal directories.