Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
devlights committed Oct 31, 2024
1 parent cc5e1ed commit 58a4d88
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 15 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,3 @@ func (me *CountdownLatch) CurrentCount() int {

return int(me.count.Load())
}

// Reset は、カウントを指定された値にリセットします.
// リセットすることになるため、強制的にカウント満了したことになり、待機している非同期処理が存在する場合は解除されます.
func (me *CountdownLatch) Reset(count int) {
if count < 0 {
panic("リセットカウントは0以上である必要があります")
}

me.mutex.Lock()
defer me.mutex.Unlock()

me.cond.Broadcast()

me.count.Store(int32(count))
}
File renamed without changes.
File renamed without changes.

0 comments on commit 58a4d88

Please sign in to comment.