<commit_before>package util

import (
	"sync"
)

type WaitGroupWrapper struct {
	sync.WaitGroup
}

func (w *WaitGroupWrapper) Wrap(cb func()) {
	w.Add(1)
	go func() {
		cb()
		w.Done()
	}()
}<commit_msg>Update wait_group_wrapper.go<commit_after>package util

import (
	"sync"
)

// 封装sync.WaitGroup，等待goroutine退出
type WaitGroupWrapper struct {
	sync.WaitGroup
}

// 传入调用函数，执行前WaitGroup加一，运行结束减一
func (w *WaitGroupWrapper) Wrap(cb func()) {
	w.Add(1)
	go func() {
		cb()
		w.Done()
	}()
}
{'fraction_non_alphanumeric': 0.1540041067761807, 'fraction_numerical': 0.004106776180698152, 'mean_word_length': 4.304347826086956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5918738', 'n_tokens_mistral': 220, 'n_tokens_neox': 226, 'n_words': 39}