¡@

Home 

c# Programming Glossary: syncroot

What's the best way of implementing a thread-safe Dictionary?

http://stackoverflow.com/questions/157933/whats-the-best-way-of-implementing-a-thread-safe-dictionary

TValue IDictionary TKey TValue private readonly object syncRoot new object private Dictionary TKey TValue d new Dictionary TKey.. Dictionary TKey TValue public object SyncRoot get return syncRoot public void Add TKey key TValue value lock syncRoot d.Add.. syncRoot public void Add TKey key TValue value lock syncRoot d.Add key value more IDictionary members... I then lock on..

The need for volatile modifier in double checked locking in .NET

http://stackoverflow.com/questions/1964731/the-need-for-volatile-modifier-in-double-checked-locking-in-net

static volatile Singleton instance private static object syncRoot new Object private Singleton public static Singleton Instance.. static Singleton Instance get if instance null lock syncRoot if instance null instance new Singleton return instance.. instance new Singleton return instance why doesn't lock syncRoot accomplish the necessary memory consistency Isn't it true that..

What's the use of the SyncRoot pattern?

http://stackoverflow.com/questions/728896/whats-the-use-of-the-syncroot-pattern

lock this ... and compares to the SyncRoot pattern object syncRoot new object void doThis lock syncRoot ... void doThat lock syncRoot.. pattern object syncRoot new object void doThis lock syncRoot ... void doThat lock syncRoot ... However I don't really understand.. new object void doThis lock syncRoot ... void doThat lock syncRoot ... However I don't really understand the difference here it..

Monitoring Garbage Collector in C#

http://stackoverflow.com/questions/9669963/monitoring-garbage-collector-in-c-sharp

static volatile GCMonitor instance private static object syncRoot new object private Thread gcMonitorThread private ThreadStart.. static GCMonitor GetInstance if instance null lock syncRoot instance new GCMonitor return instance private GCMonitor..

ObservableCollection element-wise Transform/Projection Wrapper

http://stackoverflow.com/questions/13920703/observablecollection-element-wise-transform-projection-wrapper

public bool IsSynchronized get return false public object SyncRoot get return m_TransformedCollection ObservableCollection T m_TransformedCollection..

What's the best way of implementing a thread-safe Dictionary?

http://stackoverflow.com/questions/157933/whats-the-best-way-of-implementing-a-thread-safe-dictionary

in C# by deriving from IDictionary and defining a private SyncRoot object public class SafeDictionary TKey TValue IDictionary TKey.. TKey TValue d new Dictionary TKey TValue public object SyncRoot get return syncRoot public void Add TKey key TValue value.. key value more IDictionary members... I then lock on this SyncRoot object throughout my consumers multiple threads Example lock..

Hashtable to Dictionary<> syncroot .

http://stackoverflow.com/questions/327654/hashtable-to-dictionary-syncroot

of a Dictionary. Expanding on it though. The reason the SyncRoot property was not directly added to the generic dictionary is..

How can I dynamically change auto complete entries in a C# combobox or textbox?

http://stackoverflow.com/questions/515561/how-can-i-dynamically-change-auto-complete-entries-in-a-c-sharp-combobox-or-text

I don't know what I should lock the only thing that has a SyncRoot member is the AutoCompleteStringCollection and locking that..

What type of IProducerConsumerCollection<T> to use for my task?

http://stackoverflow.com/questions/5843383/what-type-of-iproducerconsumercollectiont-to-use-for-my-task

public int Count get return m_queue.Count public object SyncRoot get return m_lockObject public bool IsSynchronized get return..

What's the use of the SyncRoot pattern?

http://stackoverflow.com/questions/728896/whats-the-use-of-the-syncroot-pattern

the use of the SyncRoot pattern I'm reading a c# book that describes the SyncRoot pattern... SyncRoot pattern I'm reading a c# book that describes the SyncRoot pattern. It shows void doThis lock this ... void doThat lock.. this ... void doThat lock this ... and compares to the SyncRoot pattern object syncRoot new object void doThis lock syncRoot..