testchannel

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrainChannel

func DrainChannel[V any](ch <-chan V) error

DrainChannel attempts to receive from the given channel, blocking, until it is empty. It returns an error if the channel is not closed by the time it's empty. TODO_CONSIDERATION: this function could easily take a timeout parameter and add a case which returns an error if the timeout is exceeded. This would prevent the case where the channel never stops receiving from looping indefinitely.

Types

This section is empty.

Jump to

Keyboard shortcuts

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