Skip to content

Commit

Permalink
std::sync: add the new static method to the WaitGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Feb 15, 2024
1 parent 04aa1a2 commit 187d4fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions std/sync/waitgroup.jule
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ pub struct WaitGroup {
}

impl WaitGroup {
// Returns new WaitGroup instance.
pub static fn new(): &WaitGroup {
ret new(WaitGroup)
}

// Increments (+delta) or decrements (-delta) task count by delta
// and unblocks any wait() calls if task count becomes zero.
// Panics if task count reaches below zero.
Expand Down

0 comments on commit 187d4fb

Please sign in to comment.