{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lect10 - Yin Lou CS 2026 Spring 2010 Assignment 2 will be...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Yin Lou CS 2026, Spring 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Assignment 2 will be graded today See feedback on CMS Assignment 3 is released due this Sunday
Background image of page 2
LINQ LINQ Operators
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Concept of Threading Synchronization Unsafe code
Background image of page 4
Threading provides concurrent execution As opposed to “sequential” execution Single processors can give illusion of concurrent execution (time slicing) Multiprocessors and multicore can give true concurrent execution Threads vs. Processes Threads share address space Less expensive to communicate within threads
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
How to create a thread System.Threading namespace New Thread instance with ThreadStart delegate public delegate void ThreadStart(); Start() method to start the thread
Background image of page 8
Thread.Abort method Terminate a thread Raise ThreadAbortException Can be supressed with Thread.ResetAbort() Thread.Sleep method Thread.Join method Wait for the completion of another thread Better than busy-polling on Thread.IsAlive Thread.Priority property
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}