by signorovitch
2 subcomments
- Single-threading is also what allows you to stay up all night writing the 8 page essay that's due at 6:00am, what lets you drive for hours on end, what remembers protocol during a crisis. Not detracting from the OP's point at all, just single threading doesn't always have to be pleasant. One of its advantages is powering you through unpleasantries and getting what needs to be done done. Sometimes when we think we are 'multitasking,' we're just looking for ways to avoid the problem.
- Single Treading is easy and hard at the same time. I Program MCU with only one core and no real hardware support for preemtive multi tasking. i sometimes have to resort to interupts to get a somewhat Multitasking but on the other hand my code runs as i have wrote it. It makes you think more about the problem. i see may programs nowerdays just throwing Threads, co-routines and memory on problems till the speed is acceptable. sorry my english no native speaker, and if i use AI to make the wording better i get complains using AI....
- This metaphor totally gets muddied once you consider some of the most optimized programs are run on a single thread in an event loop. Communication between threads is expensive, epolling many io streams is less so. Not quite sure what implications this has in life but you could probably ascribe some wisdom to it.
- Serialized execution flow and large work batches seem to be just as good for humans as for machines.
Context switching is expensive in any domain once you look at it from an information theory perspective. Communication of the information almost always costs more than computation over the information. Large batches solve this.
If I'm in my kitchen and I've got everything I need to make 2 lbs of taco meat, I also have nearly everything I need to make 4 lbs. From a process perspective it's identical. The additional amount of time required is sub-linear in this situation. There's probably enough capacity for 6-7 lbs before I saturate the capabilities of my residential equipment.
- I love to single thread but nobody else seems to. A typical situation would be making a sandwich for one kid while two others are trying to talk to me at the same time, each rising in volume to cut through the noise of the other. Partner explains in roundabout way that something is needed tomorrow. I wonder what to do with that information and wish it had been communicated in fewer words while making the sandwich. Then the phone rings.
A lot of the time work has this character also.
by Ono-Sendai
0 subcomment
- Use a multithreaded blocking approach. Much nicer than async.
by codetiger
1 subcomments
- I love reading this article start to finish. I really love the way the author has explained. And believe this is a tech-savvy explanation of mindfulness.
- I’m currently diving into Python’s asyncio
by 01HNNWZ0MV43FF
0 subcomment
- Blocking is laying in bed waiting for my paycheck before I can get up.
Multi-threading is handing off a simple task to someone else who will do it slower and need constant explanation, so that it looks like I'm less busy.
Single-threading is writing and sending an email before returning to my work.
- > The human brain is not a state-of-the-art multi-core processor. It is closer to an old single-core chip from the 90s.
That is plain bullshit. Make your case, but don't mix biology with it.