FAQ.MultiThreading

From Overbyte
Revision as of 16:49, 3 March 2006 by Wilfried (talk | contribs)
Jump to navigation Jump to search

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).