You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "LI123456mo (via GitHub)" <gi...@apache.org> on 2026/09/25 06:21:04 UTC
Re: [D] [Q/A][Java SDK (Component)] For asynchronous calls, should I use asyncCall or virtual threads? [dubbo]
GitHub user LI123456mo added a comment to the discussion: [Q/A][Java SDK (Component)] For asynchronous calls, should I use asyncCall or virtual threads?
Here let me try to answer from what I researched on
When you use virtual threads, creating a virtual thread (and the executor to manage it) isn't free — it's cheap, way cheaper than a real OS thread, but it's not zero. There's a small bit of memory and bookkeeping overhead per virtual thread.
Using the AsyncCall() style which dubbo uses, you are being handed back the thread by the CompletableFuture, and since dubbo has background threads(netty I/O threads) that hands the result once ready, this is completely non-blocking and dubbo was implementing this asynchronous style way before virtual thread.
So choose option asyncCall() which was already doing the same thing even before the virtual thread.
@polarisGitHub @zrlw @oxsean @RainYuY did I answered well?
GitHub link: https://github.com/apache/dubbo/discussions/16379#discussioncomment-18593977
----
This is an automatically sent email for notifications@dubbo.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@dubbo.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org