Metal renderer threading issues [macOS]
Alan Snyder
javalists at cbfiddle.com
Sat Oct 7 12:59:54 UTC 2023
I’ve been investigating a problem with a long running application that accumulates an apparently unbounded number of
CVDisplayLink threads. I do not yet have an explanation or a test case.
The code that creates and releases CVDisplayLinks looks fine, but that assumes there are no threading issues.
It looks like there are threading issues.
Specifically, it appears that the startDisplayLink and stopDisplayLink methods of the Objective-C class MTLLayer are invoked on multiple threads.
They are invoked on the AppKit main thread from screen sleep notifications and blitTexture.
They are invoked on the EDT from MTLLayer.validate.
They are invoked on the Queue Flusher thread from MTLRenderQueue.flushBuffer.
Perhaps someone familiar with this code could comment?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20231007/0b919475/attachment.htm>
More information about the core-libs-dev
mailing list