[Xr] Can the xrs argument be removed?
Carl Worth
cworth at east.isi.edu
Thu May 22 17:16:09 PDT 2003
On May 22, Bill Spitzak wrote:
> I think only the pointer is thread-local. The XrState structure itself is in
> normal memory, so another thread could use it. Once the thread dies nothing
> can access the pointer, but if it's value was copied somewhere the XrState is
> still available.
Yes, of course. Thanks.
> I think it would be a good idea to lock at the XrState level, so that only
> one thread can use an XrState at a time (I suspect this will avoid a lot of
> internal locking in XrState, but I may be wrong).
As is, the current implementation of Xr doesn't have any internal
locking. So right now, either only one thread uses an XrState at a
time, (which is not enforced), or locking is done externally.
The option above enforces the "one thread at a time" rule while
disallowing the external locking.
I'm not sure which scenario is preferable.
-Carl
More information about the cairo
mailing list