FAQ.MultiThreading

From Overbyte
Revision as of 13:57, 3 March 2006 by Guillaume (talk | contribs) (→‎Multi Threading)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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