¡@

Home 

c# Programming Glossary: lockobject

C# Producer/Consumer pattern

http://stackoverflow.com/questions/1371249/c-sharp-producer-consumer-pattern

public class Producer Queue string queue Object lockObject static int seq 0 public Producer Queue string queue Object lockObject.. static int seq 0 public Producer Queue string queue Object lockObject this.queue queue this.lockObject lockObject public void produce.. string queue Object lockObject this.queue queue this.lockObject lockObject public void produce while seq 15 just testinng 15..

Stopping timer in its callback method

http://stackoverflow.com/questions/1699543/stopping-timer-in-its-callback-method

private void CreatorLoop object state if Monitor.TryEnter lockObject try Work here finally Monitor.Exit lockObject share improve..