Skip to content

Replace timeout-based throttling with proper channel backpressure#761

Open
mokshasoft wants to merge 1 commit intoreplikativ:mainfrom
mokshasoft:graalvm-fix-backpressure
Open

Replace timeout-based throttling with proper channel backpressure#761
mokshasoft wants to merge 1 commit intoreplikativ:mainfrom
mokshasoft:graalvm-fix-backpressure

Conversation

@mokshasoft
Copy link
Contributor

Use >! (blocking put) instead of put! combined with timeout sleeping. This provides proper backpressure semantics - the go-loop naturally parks when the commit queue buffer is full, instead of using an artificial 50ms sleep as a throttle.

This removes one use of core.async/timeout which helps with GraalVM native-image compatibility (timeout creates a daemon thread).

SUMMARY

Checks

Bugfix
  • Related issues linked using fixes #number
  • Integration tests added
  • Architecture Decision Record added if design changes necessary
  • Formatting checked
Feature
  • Implements an existing feature request. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Architecture Decision Record added
  • Formatting checked

ADDITIONAL INFORMATION

Use >! (blocking put) instead of put! combined with timeout sleeping.
This provides proper backpressure semantics - the go-loop naturally
parks when the commit queue buffer is full, instead of using an
artificial 50ms sleep as a throttle.

This removes one use of core.async/timeout which helps with GraalVM
native-image compatibility (timeout creates a daemon thread).
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