Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use synchronous ring buffer map callbacks by default #4142

Open
mikeagun opened this issue Jan 15, 2025 · 0 comments
Open

Use synchronous ring buffer map callbacks by default #4142

mikeagun opened this issue Jan 15, 2025 · 0 comments
Labels
blocked Blocked on another issue that must be done first breaking change

Comments

@mikeagun
Copy link
Collaborator

Describe the bug

The current behavior on Windows is to only support asynchronous callbacks for ring buffer maps. The callback will be automatically invoked when data is available.

On linux there are no asynchronous callbacks for ringbuffers and the callback is only called inside calls to ring_buffer__poll() and ring_buffer__consume().

This will be a major breaking change to the ring buffer behavior, so should be put off until other API breaking changes are made. This also depends on #3848 being completed to support synchronous consumers.

OS information

No response

Steps taken to reproduce bug

  1. Call ring_buffer__new.
  2. Write events into ring buffer
  3. callback will be automatically invoked after records are written.

Expected behavior

Expected behaviour on linux is that callback is not called outside of ring buffer poll and consume. This should eventually become the Windows default to resolve this incompatibility.

Actual outcome

On Windows there are only asynchronous callbacks right now, so the callback could be invoked as soon as it is attached.

Additional details

No response

@mikeagun mikeagun added blocked Blocked on another issue that must be done first breaking change labels Jan 15, 2025
@mikeagun mikeagun changed the title Bug title Use synchronous ring buffer map callbacks by default. Jan 15, 2025
@mikeagun mikeagun changed the title Use synchronous ring buffer map callbacks by default. Use synchronous ring buffer map callbacks by default Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked on another issue that must be done first breaking change
Projects
None yet
Development

No branches or pull requests

1 participant