wrap

package
v0.0.0-...-212a885 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

* @Author: Wangjun * @Date: 2021-05-15 22:43:20 * @LastEditTime: 2022-08-23 10:33:01 * @LastEditors: Wangjun * @Description: * @FilePath: \fan_wind_powerd:\go\src\gitee.com\haodreams\golib\wrap\wrap.go * hnxr

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WaitGroupWrapper

type WaitGroupWrapper struct {
	sync.WaitGroup
	// contains filtered or unexported fields
}

WaitGroupWrapper .

func NewWaitGroupWrapper

func NewWaitGroupWrapper(maxThread int) *WaitGroupWrapper

NewWaitGroupWrapper 支持设置最大线程数的wg

func (*WaitGroupWrapper) Wrap

func (m *WaitGroupWrapper) Wrap(cb func())

Wrap cb 回调函数 回调函数需要注意的是 回调函数内部的变量是引用变量,需要注意创建新变量复制

Jump to

Keyboard shortcuts

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