Skip to content

Conversation

@nevans
Copy link
Collaborator

@nevans nevans commented Oct 13, 2024

This backports #330 from master (0.5.0-dev).

While trying to track down the cause of #287 for @hsbt, I noticed that
this is likely a race condition.  While this can't be the cause of that
issue (the failures come from tests that don't even use FakeServer), it
seems like a good idea to fix anyway, and safe.
This is similar to ActiveSupport's Array#extract!.

Yields all of the unhandled #responses for a single response type.
Removes and returns the responses for which the block returns a true
value.

Extracting responses is synchronized with other threads.  The lock is
released before returning.
@nevans nevans merged commit e60cde6 into v0.4-stable Oct 13, 2024
26 checks passed
@nevans nevans deleted the backport/0.4/330/extract_responses branch October 13, 2024 11:56
@nevans nevans added backport This issue or PR is for a stable release branch enhancement New feature or request labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This issue or PR is for a stable release branch enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants