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

Attachment: Locale.diff
Description: Binary data

_______________________________________________
Mono-devel-list mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to