Click here to Skip to main content
15,867,686 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: Multithreaded code is ridiculous Pin
Gerry Schmitz16-Jul-20 7:03
mveGerry Schmitz16-Jul-20 7:03 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch16-Jul-20 7:08
mvahoney the codewitch16-Jul-20 7:08 
GeneralRe: Multithreaded code is ridiculous Pin
Gerry Schmitz16-Jul-20 11:36
mveGerry Schmitz16-Jul-20 11:36 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch16-Jul-20 11:52
mvahoney the codewitch16-Jul-20 11:52 
GeneralRe: Multithreaded code is ridiculous Pin
Gerry Schmitz16-Jul-20 12:27
mveGerry Schmitz16-Jul-20 12:27 
GeneralRe: Multithreaded code is ridiculous Pin
maze317-Jul-20 0:59
professionalmaze317-Jul-20 0:59 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch17-Jul-20 2:31
mvahoney the codewitch17-Jul-20 2:31 
GeneralRe: Multithreaded code is ridiculous Pin
Thomas Chizek17-Jul-20 1:48
Thomas Chizek17-Jul-20 1:48 
Okay, I know I am late to the party here and might be a voice in the wilderness, but I think for your case, using manual multi-threading is exactly the right way to go. Why? Because you are teaching, students need to understand the complexity of the underlying functionality to be able to know when it is appropriate to use the simplified interfaces that modern languages, libraries, and syntactic sugar have added over the last thirty years.
One of the things that I see in code that has been written by people who just discovered the async calls or the Thread library in whatever language is hot with management is the overuse of threads. They throw calls that are absolutely sure to block right here right now into a separate thread, even though processing on their application can not proceed without the answer. Hey folks, all of our operating systems and most of our language runtimes are smart enough to detect when some thread/process goes out for a long IO operation and let something else use the CPU. There is no need to add the overhead and complexity of putting your IO into a thread.
On the other hand, beginners often miss thread operations in large complex compute operations. Activities where spinning the processing of a security token or hash into a temporary thread on a different core/processor thread with an async callback would let the other pre-authorized operations start rather than blocking on that operation.
So, in addition to teaching them about the complexity of the dance that happens behind every simple thread spawn, you can also give them some views into the differences between appropriate and inappropriate times to use threads. Why the specific example is a teaching only example, and what real use-cases would be.
Just a thought.
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch17-Jul-20 2:05
mvahoney the codewitch17-Jul-20 2:05 
GeneralRe: Multithreaded code is ridiculous Pin
Thomas Chizek17-Jul-20 2:15
Thomas Chizek17-Jul-20 2:15 
GeneralRe: Multithreaded code is ridiculous Pin
computer_nerd17-Jul-20 2:26
computer_nerd17-Jul-20 2:26 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch17-Jul-20 2:29
mvahoney the codewitch17-Jul-20 2:29 
GeneralRe: Multithreaded code is ridiculous Pin
obermd17-Jul-20 3:32
obermd17-Jul-20 3:32 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch17-Jul-20 5:30
mvahoney the codewitch17-Jul-20 5:30 
AnswerRe: Multithreaded code is ridiculous Pin
Chad3F22-Jul-20 9:57
Chad3F22-Jul-20 9:57 
GeneralRe: Multithreaded code is ridiculous Pin
honey the codewitch22-Jul-20 10:58
mvahoney the codewitch22-Jul-20 10:58 
GeneralOutlook Down for Some Worldwide Pin
CodeWraith15-Jul-20 9:35
CodeWraith15-Jul-20 9:35 
GeneralRe: Outlook Down for Some Worldwide Pin
Richard Deeming15-Jul-20 23:33
mveRichard Deeming15-Jul-20 23:33 
NewsOutlook Down for Some Worldwide Pin
Cp-Coder15-Jul-20 9:12
Cp-Coder15-Jul-20 9:12 
GeneralRe: Outlook Down for Some Worldwide Pin
Ron Anders15-Jul-20 15:00
Ron Anders15-Jul-20 15:00 
GeneralXml Notepad 2007 Pin
Gerry Schmitz15-Jul-20 7:40
mveGerry Schmitz15-Jul-20 7:40 
GeneralRe: Xml Notepad 2007 Pin
CodeWraith15-Jul-20 7:51
CodeWraith15-Jul-20 7:51 
GeneralRe: Xml Notepad 2007 Pin
Gerry Schmitz15-Jul-20 8:28
mveGerry Schmitz15-Jul-20 8:28 
GeneralRe: Xml Notepad 2007 Pin
CodeWraith15-Jul-20 8:36
CodeWraith15-Jul-20 8:36 
GeneralRe: Xml Notepad 2007 Pin
Mike Hankey15-Jul-20 7:57
mveMike Hankey15-Jul-20 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.