Click here to Skip to main content
15,891,529 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: Comet NEOWISE Pin
5teveH15-Jul-20 22:31
5teveH15-Jul-20 22:31 
GeneralRe: Comet NEOWISE Pin
jsc4216-Jul-20 0:19
professionaljsc4216-Jul-20 0:19 
GeneralRe: Comet NEOWISE Pin
Daniel Pfeffer16-Jul-20 1:04
professionalDaniel Pfeffer16-Jul-20 1:04 
GeneralRe: Comet NEOWISE Pin
5teveH16-Jul-20 1:59
5teveH16-Jul-20 1:59 
GeneralRe: Comet NEOWISE Pin
jsc4217-Jul-20 0:13
professionaljsc4217-Jul-20 0:13 
RantMultithreaded code is ridiculous PinPopular
honey the codewitch15-Jul-20 10:45
mvahoney the codewitch15-Jul-20 10:45 
GeneralRe: Multithreaded code is ridiculous PinPopular
Greg Utas15-Jul-20 11:05
professionalGreg Utas15-Jul-20 11:05 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch15-Jul-20 11:47
mvahoney the codewitch15-Jul-20 11:47 
What I'm doing is I'm queuing up tasks. In the demo each time a user clicks a button (in order to queue up a new task) the code looks for an available worker. If it doesn't have one, and it can create a new one (and consequently a new thread) then it will. Otherwise if there are already a maximum number of workers created it will choose one of the busy workers to handle the next task. All of the workers do the same task. Think of this like a server application that accepts a limited number of incoming requests into a pool of workers, but will then queue requests after the limit is exceeded among the busy workers. One of them will pick it up as soon as it's finished with what it's doing. Make sense? I hope it does! Unsure | :~

ETA: Wait, I think I see what you mean by using one queue. I'll have to think on this.
Real programmers use butterflies

GeneralRe: Multithreaded code is ridiculous Pin
Greg Utas15-Jul-20 12:22
professionalGreg Utas15-Jul-20 12:22 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch15-Jul-20 12:36
mvahoney the codewitch15-Jul-20 12:36 
GeneralRe: Multithreaded code is ridiculous Pin
Greg Utas15-Jul-20 12:58
professionalGreg Utas15-Jul-20 12:58 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch15-Jul-20 13:16
mvahoney the codewitch15-Jul-20 13:16 
GeneralRe: Multithreaded code is ridiculous Pin
raddevus15-Jul-20 17:29
mvaraddevus15-Jul-20 17:29 
GeneralRe: Multithreaded code is ridiculous Pin
Member 1330167916-Jul-20 20:19
Member 1330167916-Jul-20 20:19 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch17-Jul-20 2:09
mvahoney the codewitch17-Jul-20 2:09 
GeneralRe: Multithreaded code is ridiculous Pin
Member 1330167917-Jul-20 6:28
Member 1330167917-Jul-20 6:28 
GeneralRe: Multithreaded code is ridiculous Pin
achillepaoloni18-Jul-20 7:23
achillepaoloni18-Jul-20 7:23 
GeneralRe: Multithreaded code is ridiculous Pin
raddevus15-Jul-20 17:34
mvaraddevus15-Jul-20 17:34 
GeneralRe: Multithreaded code is ridiculous Pin
Nelek15-Jul-20 22:16
protectorNelek15-Jul-20 22:16 
GeneralRe: Multithreaded code is ridiculous Pin
raddevus16-Jul-20 3:05
mvaraddevus16-Jul-20 3:05 
GeneralRe: Multithreaded code is ridiculous Pin
Greg Utas16-Jul-20 0:37
professionalGreg Utas16-Jul-20 0:37 
GeneralRe: Multithreaded code is ridiculous Pin
CodeWraith15-Jul-20 11:06
CodeWraith15-Jul-20 11:06 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch15-Jul-20 11:56
mvahoney the codewitch15-Jul-20 11:56 
GeneralRe: Multithreaded code is ridiculous Pin
CodeWraith15-Jul-20 12:04
CodeWraith15-Jul-20 12:04 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch15-Jul-20 12:34
mvahoney the codewitch15-Jul-20 12:34 

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.