[OpenJDK 2D-Dev] Thread-Private RenderBuffers for RenderQueue?
Clemens Eisserer
linuxhippy at gmail.com
Sat Mar 22 23:42:17 UTC 2008
Hello,
1.) While studying RenderQueue from the STR based 2d pipelines I
notices synchronization happening for every command put in the queue.
I don't know wether tuning this is worth anything (guess not), but are
there cases which make thread-private RenderBuffers impossible (maybe
with a limit of buffers allocated)? Many threads rendering to the same
surface don't have any guarantees anyway when an operation is
performed. Or is ReentrantLock so fast that it really does not make
any sence worriyng about?
2.) I have JDK7b19, I am not completly sure wether the sync()-method
is 100% thread-safe, or wether this is ok in that case.
The field "theInstance" is written to in a synchronized-block (in
getInstance()) but in sync() its accassed without synchronization. It
may appear null (as far as I understand) in one thread while another
has already set it. Don't know wether this could be a problem?
Thanks, Clemens
More information about the 2d-dev
mailing list