On Tue, 22 Oct 2024 15:23:50 GMT, Andrew Haley <a...@openjdk.org> wrote:

> This last sentence has interesting consequences for user-defined schedulers. 
> Would it make sense to throw an exception if a carrier thread is holding a 
> monitor while mounting a virtual thread? Doing that would also have the 
> advantage of making some kinds of deadlock impossible.

There's nothing exposed today to allow custom schedulers. The 
experiments/explorations going on right now have to be careful to not hold any 
locks. Throwing if holding a monitor is an option but only it would need to be 
backed by spec and would also shine light on the issue of j.u.concurrent locks 
as a carrier might independently hold a lock there too.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/21565#issuecomment-2431600434

Reply via email to