Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>1. Asynchronous Delegates</strong></p> <blockquote> <p>Asychronous calling is used when you have work items that should be handled in the background and <em>you care when they finish</em>.</p> </blockquote> <p><a href="https://stackoverflow.com/questions/1506838/backgroundworker-vs-background-thread/1507337#1507337">BackgroundWorker vs background Thread</a></p> <p><strong>2. BackgroundWorker</strong></p> <blockquote> <ul> <li><strong>Use BackgroundWorker</strong> if you have a single task that runs in the background and <em>needs to interact with the UI.</em> and use it if <em>you don't care when they finish</em> their task. The task of marshalling data and method calls to the UI thread are handled automatically through its event-based model. </li> <li><strong>Avoid BackgroundWorker</strong> if (1) your assembly does not already reference the System.Windows.Form assembly, (2) you need the thread to be a foreground thread, or (3) you need to manipulate the thread priority.</li> </ul> </blockquote> <p><strong>3. ThreadPool</strong> </p> <blockquote> <ul> <li><strong>Use a ThreadPool</strong> thread when efficiency is desired. The ThreadPool helps avoid the overhead associated with creating, starting, and stopping threads. </li> <li><strong>Avoid using the ThreadPool</strong> if (1) the task runs for the lifetime of your application, (2) you need the thread to be a foreground thread, (3) you need to manipulate the thread priority, or (4) you need the thread to have a fixed identity (aborting, suspending, discovering).</li> </ul> </blockquote> <p><strong>4. Thread class</strong></p> <blockquote> <ul> <li><strong>Use the Thread class</strong> for long-running tasks and when you require features offered by a formal threading model, e.g., choosing between foreground and background threads, tweaking the thread priority, fine-grained control over thread execution, etc.</li> </ul> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload