Difference between revisions of "FAQ.MultiThreading"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
== A Worker Thread == | == 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). | + | 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). |
Revision as of 14:03, 3 March 2006
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).