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

Swow driver #89

Open
luzrain opened this issue Nov 19, 2023 · 3 comments
Open

Swow driver #89

luzrain opened this issue Nov 19, 2023 · 3 comments

Comments

@luzrain
Copy link

luzrain commented Nov 19, 2023

Is it possible to add swow driver?

@ging-dev
Copy link

Is it possible to add swow driver?

swow does not provide APIs related to the event loop, and it is hooked directly into stream_select so there is no need to create a separate driver for it to work.

@bwoebi
Copy link
Contributor

bwoebi commented Nov 26, 2023

Swow actually does provide a stream_select_unlimited() function, with the same signature than stream_select. This function is directly compatible with the underlying event loop, i.e. Swow will process events for its own code at the same time than it processes stream_select_unlimited events.

So, at least technically it should be possible to add a Swow driver. The code would need to be able to handle calls from Swow callbacks into the Revolt event loop, i.e. basically, if the revolt Swow event loop driver is currently processing a stream_select_unlimited, it would need to pick up new events.

@ging-dev
Copy link

Both stream_select_unlimited() and stream_select() when using Swow are not stable.
Ref: swow/swow#209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants