Skip to content

Adds an autoRenew option to withLock#10

Open
ddevilbiss wants to merge 1 commit into
wondrify:masterfrom
ddevilbiss:with-lock-auto-renew
Open

Adds an autoRenew option to withLock#10
ddevilbiss wants to merge 1 commit into
wondrify:masterfrom
ddevilbiss:with-lock-auto-renew

Conversation

@ddevilbiss

Copy link
Copy Markdown

Spawns a background promise to periodically renew the lock at half the TTL interval while the closure is executing. The renewal loop uses an AtomicBoolean and monitor wait/notify for clean shutdown on lock release. Also fixes withLock to respect the provider's raiseError flag (throws RuntimeException instead of silently logging when lock acquisition fails)

… to periodically renew the lock at half the TTL interval while the closure is executing. The renewal loop uses an AtomicBoolean and monitor wait/notify for clean shutdown on lock release. Also fixes withLock to respect the provider's raiseError flag (throws RuntimeException instead of silently logging when lock acquisition fails)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant