Threading Tips 10 Best Practices and Tips
Short Description
Update a Control only from the thread it was created on.
- Detect if invoke is required.
- Use delegate to forward to Control’s thread
- InvalidOperationException thrown if updating from wrong thread.
Website: www.softwarejuice.com | Filesize: 44kb
No of Page(s): 11
Content
…
C# lock statement is compiler sugar for Monitor.Enter and Monitor.Exit
- Requires a reference to use as lock.
- Compiler checks that specified lock is not a value type.
+ Compiler does not check Monitor.Enter/Exit.
- object lock is released regardless if exception is thrown.
…
Get the file Download here
Related Books:Related Searches:
Comments
Leave a Reply
Search engine terms: thread best practices,