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

RxJava on JDK 21's virtual threads #7763

Open
abersnaze opened this issue Sep 14, 2024 · 3 comments
Open

RxJava on JDK 21's virtual threads #7763

abersnaze opened this issue Sep 14, 2024 · 3 comments

Comments

@abersnaze
Copy link
Contributor

I'm exploring implementing a new branch of RxJava, where the internals are rewritten to leverage JDK 21's virtual threads. I hope this will significantly simplify Rx's internal implementation and debuggability while maintaining the same interface as 3.x.

This issue is to discuss the idea positively to address architectural problems with compatibility and performance.

I haven't yet set a time frame for when or if this will be completed. I will only submit this with the community's approval. If a community of developers likes this idea and runs with it faster than I keep up, I'm also okay with stepping aside.

@akarnokd et al., Before we discuss the merits or implementation of the idea, are there any additional ground rules for this discussion?

@akarnokd
Copy link
Member

are there any additional ground rules for this discussion?

None I can think of right now.

@ReactiveX ReactiveX deleted a comment from cj-marius-duna Dec 19, 2024
@Sm0keySa1m0n
Copy link

What would you envision reactive programming's new role to be with the introduction of virtual threads? I can imagine virtual threads and structured concurrency would replace most non-stream based reactive usage (e.g. Single and Mono); but for streams of data I suppose reactive streams are still useful, albeit processing of individual stream elements could again be offloaded to virtual threads and structured concurrency.

@abersnaze
Copy link
Contributor Author

Much of the internals are devoted to non-blocking pressure. I was specifically thinking about the drainLoop

I think the debugging stack traces and internals would be much simpler virtual blocking queue were used.

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

No branches or pull requests

3 participants