Skip to content

feat!: v5.0 - new default concurrency model - #151

Open
smudge wants to merge 1 commit into
smudge/worker-sleep-eventfrom
smudge/replenish-by-default
Open

smudge wants to merge 1 commit into
smudge/worker-sleep-eventfrom
smudge/replenish-by-default

Conversation

@smudge

@smudge smudge commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

This turns on replenish_threads, as the v5.0 reminder test requires.

It also drops the reminder to default min_reserve_interval to a positive value, which stays at 0. Since a replenishing worker's reserves are now spaced out by its busy threads, it only reserves again right away once all of its threads are free, just as a batching worker did once its batch finished.

To keep the 4.x behaviour, set Delayed::Worker.replenish_threads = false.

@smudge
smudge added this pull request to stack #149 December 1, 2026 18:26
@smudge smudge changed the title feat!: replenish threads and space out reserves by default feat!: v5.0 - new default concurrency model Dec 1, 2026
@smudge
smudge force-pushed the smudge/replenish-by-default branch from 7ae648e to e05ecc8 Compare December 1, 2026 18:31
@smudge
smudge force-pushed the smudge/replenish-by-default branch from e05ecc8 to e2af0a3 Compare December 1, 2026 18:42
@smudge
smudge force-pushed the smudge/replenish-by-default branch 2 times, most recently from a3e7fca to 03ea46f Compare December 1, 2026 18:59
@smudge
smudge marked this pull request as ready for review December 1, 2026 19:59
@smudge
smudge force-pushed the smudge/replenish-by-default branch 2 times, most recently from d15eff1 to f091907 Compare December 1, 2026 21:42
@smudge
smudge removed this pull request from stack #149 December 1, 2026 21:52
@smudge
smudge changed the base branch from smudge/free-thread-spacing to smudge/worker-sleep-event December 1, 2026 21:54
@smudge
smudge added this pull request to stack #154 December 1, 2026 21:54
@smudge
smudge removed this pull request from stack #154 December 1, 2026 21:55
@smudge
smudge added this pull request to stack #155 December 1, 2026 21:55
@smudge
smudge force-pushed the smudge/replenish-by-default branch 2 times, most recently from f187de3 to ccfbb36 Compare December 2, 2026 16:17
This turns on `replenish_threads`, as the v5.0 reminder test requires.
To keep the 4.x behaviour, set `Delayed::Worker.replenish_threads =
false`.

It also drops the reminder to default `min_reserve_interval` to a
positive value, which stays at 0. Since a replenishing worker's
reserves are now spaced out by its busy threads, it only reserves again
right away once all of its threads are free, just as a batching worker
did once its batch finished.

This bumps the version to 5.0.0.
@smudge
smudge force-pushed the smudge/replenish-by-default branch from ccfbb36 to a2dec42 Compare December 3, 2026 19:27
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