channel

package
v0.0.0-...-69d094b Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 0 Imported by: 1

Documentation

Overview

Package channel 提供一些方便的 chan 操作封装

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadNonBlocked

func ReadNonBlocked[T any](ch <-chan T) (v T, empty, emptyAndClosed bool)

ReadNonBlocked 非阻塞地从一个 chan 中读出数据。当读取失败时返回

func WriteNonBlocked

func WriteNonBlocked[T any](ch chan<- T, v T) (full, closed bool)

WriteNonBlocked 非阻塞地向一个 chan 中写入数据, 当写入失败时返回

Types

This section is empty.

Jump to

Keyboard shortcuts

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