回复:Can virtual thread get better support for Map/Reduce like thing?
何品(虎鸣)
hepin.p at alibaba-inc.com
Sat Jun 22 05:50:27 UTC 2024
thanks,
Because with the current implementation, for a job like I Need translate every json properties inside a JsonObject with VirtualThread ,which returns a CompletableFuture, and to collect the final result , I need do a `future.get` in the parent VT. if I have a 1000+ properties, then 1000+ mount and unmount maybe happen when it interleave with others, it can increase the total time
------------------------------------------------------------------
发件人:Alan Bateman <Alan.Bateman at oracle.com>
发送时间:2024年6月21日(星期五) 22:30
收件人:"何品(虎鸣)"<hepin.p at alibaba-inc.com>; "loom-dev"<loom-dev at openjdk.org>
主 题:Re: Can virtual thread get better support for Map/Reduce like thing?
On 21/06/2024 12:46, 何品(虎鸣) wrote:
The current implementation always adds the task to the tail, but what if a map/reduce like work, which mean a fork() maybe better for performance/latency , but that will reduce some fairness.
If you are building the JDK yourself then you should be try it out. It would be interesting to share your results.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20240622/a59e195a/attachment.htm>
More information about the loom-dev
mailing list