Skip to content

Correct comment about when blocking_operation_wait() was released#380

Merged
ioquatix merged 1 commit intosocketry:mainfrom
XrXr:patch-1
Mar 26, 2025
Merged

Correct comment about when blocking_operation_wait() was released#380
ioquatix merged 1 commit intosocketry:mainfrom
XrXr:patch-1

Conversation

@XrXr
Copy link
Copy Markdown
Contributor

@XrXr XrXr commented Mar 26, 2025

The hook is not in the v2.19.0 tag.
c317990 shows that it was first added with v2.21.0.

@ioquatix
Copy link
Copy Markdown
Member

Thanks for correcting this!

@ioquatix ioquatix merged commit 8d63d7f into socketry:main Mar 26, 2025
28 of 31 checks passed
@XrXr XrXr deleted the patch-1 branch March 26, 2025 22:54
@ioquatix
Copy link
Copy Markdown
Member

FYI, this feature is highly experimental, I believe we need a better implementation of the worker pool - probably a C extension so we avoid re-acquiring the GVL in a thread.

@XrXr
Copy link
Copy Markdown
Contributor Author

XrXr commented Mar 26, 2025

If this is highly experimental, maybe it should be opt-in instead of opt-out (by not upgrading)? There's been 2 class of crashes related to this hook, and I suspect there's more yet to be discoverd.

Moving a nogvl call off to a different thread is inherently tricky to get right.

@ioquatix
Copy link
Copy Markdown
Member

ioquatix commented Mar 26, 2025

Thanks for your suggestion and the links to the issues.

I was under the impression that it is already opt-in: https://github.com/socketry/async/blob/main/lib/async/scheduler.rb#L28-L30

Ah, I see, there was a previous release where it was on by default: 41a0c92

But now it is already off by default (opt-in only).

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.

2 participants