Click here to Skip to main content
15,890,123 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: What are all those threads in Windows doing? Pin
Eddy Vluggen11-Jul-18 4:46
professionalEddy Vluggen11-Jul-18 4:46 
GeneralRe: What are all those threads in Windows doing? Pin
patbob11-Jul-18 5:53
patbob11-Jul-18 5:53 
GeneralRe: What are all those threads in Windows doing? Pin
kalberts11-Jul-18 9:22
kalberts11-Jul-18 9:22 
GeneralRe: What are all those threads in Windows doing? Pin
patbob11-Jul-18 10:34
patbob11-Jul-18 10:34 
GeneralRe: What are all those threads in Windows doing? Pin
kalberts11-Jul-18 22:33
kalberts11-Jul-18 22:33 
QuestionRe: What are all those threads in Windows doing? Pin
MSBassSinger12-Jul-18 7:44
professionalMSBassSinger12-Jul-18 7:44 
AnswerRe: What are all those threads in Windows doing? Pin
kalberts12-Jul-18 21:43
kalberts12-Jul-18 21:43 
GeneralRe: What are all those threads in Windows doing? Pin
Martin ISDN13-Jul-18 5:38
Martin ISDN13-Jul-18 5:38 
if you had to do some heavy processing, like converting .wav into .mp3, best way to do it was multithreading. windows 95 had support for it. it wasn't something NT specific.

not every win32 application needed a window, but if you were making a GUI application then you would register a window and a callback procedure to the win32 API. your callback procedure would receive win32 events from the OS in your event loop that was running in the primary (usually the only) thread of your application. those events that you would receive would mostly be mouse clicks on the buttons of the GUI of your app or key presses on the text areas and similar.

if you had a button that makes some time consuming task, like encrypting, and you primary (and only) thread would not only handle the button press message (event) but take care of the whole process of encrypting then your whole app window would hang. there will be nothing to process future events while your primary thread is processing the encryption.
this is where you would fire up another thread to do the time consuming processing so that you primary thread could handle GUI events, for instance minimizing your app window.

the other way to do this is somewhat similar to what they do in game programing and cooperative multitasking. you process a small chunk of the data in your primary thread and then stop. peek for events, process them and then either proceed with data processing (win32) or exit to the OS (win16) and repeat on the next turn when your primary thread gets active via your window callback procedure. sort of...
GeneralRe: What are all those threads in Windows doing? Pin
obermd12-Jul-18 10:22
obermd12-Jul-18 10:22 
GeneralRe: What are all those threads in Windows doing? Pin
DRHuff11-Jul-18 9:24
DRHuff11-Jul-18 9:24 
GeneralRe: What are all those threads in Windows doing? Pin
Nelek11-Jul-18 20:01
protectorNelek11-Jul-18 20:01 
GeneralRe: What are all those threads in Windows doing? Pin
TNCaver12-Jul-18 7:41
TNCaver12-Jul-18 7:41 
GeneralRe: What are all those threads in Windows doing? Pin
Gary Wheeler11-Jul-18 7:20
Gary Wheeler11-Jul-18 7:20 
GeneralRe: What are all those threads in Windows doing? Pin
raddevus11-Jul-18 8:46
mvaraddevus11-Jul-18 8:46 
GeneralRe: What are all those threads in Windows doing? Pin
Marc Clifton11-Jul-18 11:36
mvaMarc Clifton11-Jul-18 11:36 
GeneralRe: What are all those threads in Windows doing? Pin
kalberts11-Jul-18 21:56
kalberts11-Jul-18 21:56 
GeneralRe: What are all those threads in Windows doing? Pin
Stuart Dootson12-Jul-18 6:24
professionalStuart Dootson12-Jul-18 6:24 
QuestionHow do you handle this? Pin
Eytukan11-Jul-18 3:44
Eytukan11-Jul-18 3:44 
AnswerRe: How do you handle this? Pin
Marc Clifton11-Jul-18 3:48
mvaMarc Clifton11-Jul-18 3:48 
GeneralRe: How do you handle this? Pin
Eytukan11-Jul-18 4:00
Eytukan11-Jul-18 4:00 
GeneralRe: How do you handle this? Pin
raddevus11-Jul-18 4:53
mvaraddevus11-Jul-18 4:53 
GeneralRe: How do you handle this? Pin
Eytukan11-Jul-18 7:56
Eytukan11-Jul-18 7:56 
GeneralRe: How do you handle this? Pin
Marc Clifton11-Jul-18 11:39
mvaMarc Clifton11-Jul-18 11:39 
AnswerRe: How do you handle this? Pin
Eddy Vluggen11-Jul-18 4:52
professionalEddy Vluggen11-Jul-18 4:52 
GeneralRe: How do you handle this? Pin
Eytukan11-Jul-18 7:57
Eytukan11-Jul-18 7:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.