[Mono-devel-list] [PATCH] Reworked unified Locale classes

Kornél Pál kornelpal at hotmail.com
Thu Jun 16 05:52:45 EDT 2005


Hi,

>> Try using [ThreadStatic], it's a bit cleaner.
>
> It examined the documentation and it's really cleaner and may be faster as
> well.

In fact a global lock can be used as well because ResourceManager is thread
safe and locks itself so this will not degrade performance. In this case no
thread static variable is necessary a simple static variable can be used.

I attached a diff file with a Locale.cs that uses static variable and lock.

If you have time and gears please benchmark all of these different ways
(LocalDataStoreSlot, [ThreadStatic], lock)

Kornél
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Locale.diff
Type: application/octet-stream
Size: 4870 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050616/d166e803/attachment.obj 


More information about the Mono-devel-list mailing list