Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Go like sync.WaitGroup implementation in Rust. (sync/async)

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

just-do-halee/wag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go like sync.WaitGroup implementation in Rust. (sync/async)

CICrates.ioLicensedTwitter

|Examples |Docs |Latest Note |

wag ="0.3.0"

How to use,

use wag::WaitGroup;let wg =WaitGroup::new();
for _in0..10{let w = wg.add();    thread::spawn(move ||{// ...        w.done();});});wg.wait();// or wg.async_wait().await;
for win wg.adds::<10>(){    thread::spawn(move ||{// ...        w.done();});});wg.wait();// or wg.async_wait().await;
let[w1, w2, w3] = wg.adds();thread::spawn(move ||{// ...    w1.done();});thread::spawn(move ||{// ...    w2.done();});thread::spawn(move ||{// ...    w3.done();});wg.wait();// or wg.async_wait().await;
wg.adds_iter::<10>().enumerate().for_each(|(i, w)|{    thread::spawn(move ||{// ... with i        w.done();});});wg.wait();// or wg.async_wait().await;

About

Go like sync.WaitGroup implementation in Rust. (sync/async)

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp