Difference between revisions of "FAQ.MultiThreading"

From Overbyte
Jump to navigation Jump to search
m
Line 1: Line 1:
 +
[[Main_Page | Main page]] -> [[FAQ]] -> [[FAQ.MultiThreading | MultiThreading]]
 +
 
== Introduction ==
 
== Introduction ==
 
* What is a thread ?
 
* What is a thread ?

Revision as of 16:49, 3 March 2006

Main page -> FAQ -> MultiThreading

Introduction

  • What is a thread ?
  • What is multithreading ?
  • Advantages & Disadvantages

The Main Question

Do i need Threads ?

Cases where needed and where not needed

A Thread per Socket

When incoming connection, encapsulating socket within a thread, and managing communication within the thread, across several threads

A Worker Thread

When running a lengthy process (SQLing a RBDMS, doing bottlenecked I/O, ...), and to prevent GUI from freezing, encapsulating it in a thread (JobThread), and sending back data when the thread is done (or simulating a process end).