News for hackers. Stuff that matters.
Re:Why Threads are a Bad Idea (for most purposes) (1995) [pdf] by maxxxxx on Tuesday June 13, 2017 @04:05PM (#14548122)
How do you handle long lasting operations like checking something from time to time? Seems to me this is a natural use for a thread.
Re:Why Threads are a Bad Idea (for most purposes) (1995) [pdf] by winstonewert on Tuesday June 13, 2017 @04:10PM (#14548168)
Schedule a timer, and respond to the timer events. Its a waste of resources to have a thread hanging around sleeping all the time.
Re:Why Threads are a Bad Idea (for most purposes) (1995) [pdf] by jdmichal on Tuesday June 13, 2017 @06:06PM (#14549070)
This is basically "There is no Thread":

https://blog.stephencleary.com/2013/11/there-is-no-thread.ht...

There are times when you can offload an asynchronous task to non-CPU hardware, in which case the blocking thread can disappear. The thread reappears when the hardware asynchronously informs the CPU of task completion. (This idea is what Node.JS is entirely reliant upon.)

Consider if we didn't have timing hardware to handle this task for us. We could implement a timer with a spin-loop thread which checks the clock and fires off events.