Skip to content

Commit

Permalink
fix: prevent double group.enter() in ExpiringActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-coye committed Jun 12, 2024
1 parent 492a085 commit 3556a81
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ public final class ExpiringActivity: ExpiringActivityable {
if shouldTerminate {
self.shouldTerminate = true
delegate?.backgroundActivityExpiring()

// At this point we should release the block, but we prefer to wait until the end 🫡⛵️🪦
// There is a chance endAll() is called while we wait in should terminate
group.wait()
return
}

group.enter()
Expand Down

0 comments on commit 3556a81

Please sign in to comment.