Can't yield from within an instance created by reflection

Alan Bateman Alan.Bateman at oracle.com
Wed Apr 7 10:41:58 UTC 2021


On 07/04/2021 10:44, Øystein Myhre Andersen wrote:
> Well, I use Object.wait to ensure only one coroutine is operating at a 
> time.
> How do I increase this maximum value ?
>
> I will also try rewriting using java.util.concurrent locks
>
It is possible to run with -Djdk.defaultScheduler.maxPoolSize=<N> but I 
don't think it will help much when the goal is to get to 1M processes. 
j.u.c.locks.Condition is the replacement/equivalent of monitor 
wait/notify but if there is only one coroutine running at a time then 
you could use a semaphore or other APIs too.

-Alan.


More information about the loom-dev mailing list