CLR threads

525 views
510 views

Published on

Quick review of the therading options in .NET.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
525
On SlideShare
0
From Embeds
0
Number of Embeds
38
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

CLR threads

  1. 1. CLR Threads and the Async Programming Model<br />Florin Cardaşim<br />Lead developer<br />RomSoft, IAŞI,http://www.rms.ro <br />
  2. 2.
  3. 3. Agenda<br /><ul><li>Thread, Thread.IsBackgound, ThreadStart, Exceptions(.NET 1.1 vs 2.0)
  4. 4. ThreadPool
  5. 5. Asynchronous Programming Model: BeginInvoke, EndInvoke, AsyncCallback, IAsyncResult</li></li></ul><li>Conclusions<br /><ul><li>Use ThreadPool and the APM whenever possible!
  6. 6. When to use dedicated Thread:
  7. 7. Start with high priority; TP - normal
  8. 8. Foreground; TP - background
  9. 9. Long running operations
  10. 10. Control the thread’s lifetime (Thread.Abort)
  11. 11. Always catch and handle the exceptions</li></li></ul><li>Q&A<br />
  12. 12. Thank you!<br />Florin Cardaşim<br />Lead developer<br />RomSoft, IAŞI,http://www.rms.ro <br />

×