<AWT Dev> deadlock between AppKit main thread and AWT event thread in JDK 17
Michael Hall
mik3hall at gmail.com
Mon Jun 28 14:16:03 UTC 2021
> On Jun 28, 2021, at 9:03 AM, Alan Snyder <javalists at cbfiddle.com> wrote:
>
> You can call performSelectorOnMainThread directly, but you have to know the name of the AWT/Java run loop to avoid the deadlock situations that I have encountered.
>
> The name of the run loop needs to be part of the public API.
I haven’t successfully done much with the native run loop. I didn’t quite follow your deadlock either. What was it blocked on? It almost sounded like three starvation where the thread just never got run for some reason. Or you aren’t sure what the deadlock is on? I did get into deadlocks trying to do a OS X native watch service using kqueue that I never figured out.
Which public API? JavaNativeFoundation?
>
> By the way, upcalls from AppKit to get accessibility information has been a source of problems for a long time. I don’t suppose there is any way that Java can respond to these requests without running code on the AWT event thread?
Again native I have done hasn’t involved anything to do with AppKit so I’m not sure what you’re looking for here either.
More information about the awt-dev
mailing list