|There's more than one way to do things|
Re^17: Should I use threads? Perl/DHCP/Radiusby shmem (Chancellor)
|on Aug 25, 2010 at 22:42 UTC||Need Help??|
This is getting rather OT, so I might as well do some trolling ;-)
Which is why when a guy sees a girl in a short skirt, he fails to notice the oncoming truck.
Well, that's not becuse the poor guy is unable to multitask, but because at that very moment he stops multitasking - and focuses on that girl in a short skirt. And it could well be that his attention isn't even much on the girl but much more on the sensation this sight is causing to himself.
I haven't read much into that "modern research", but if the result is
- well, then the researchers have found out one obvious thing: tasks which demand our full attention aren't very apt for being dealt with by multitasking. Oh, wait... that isn't even multitasking what they are talking about, it's about context switching!
The other day I've been told that "on television" (whatever that is, I don't have one) amazing guys can be seen. In live shows, they chop onions, talk to the audience at the same time about what they are doing, keep an eye on the color of things frying and the bowl being filled with water from the tap, react to changes of the scent of something boiling over there, answer questions and process instructions from the filming stuff via an earphone, and more - and all that at the same time!
I didn't do research, but found out by doing (and not being able to) that I am, whilst playing lute, unable to talk or answer a question or even utter a single word if it's not in the context of the music (i.e. text of song I am performing). Does that mean that I am unable to multitask? No - it rather means that I have only one "channel of expression". But I am able to chop onions or firewood or screwing up my motorbike whilst at the same time chewing on the universe like on a piece of sugar cane with a good friend, and! listening to music.
But to meditatively explore a piece of musical art - which requires all of me being focused on it, I must refrain from doing anything else.
This "event loop vs. thread" discussion between you and zentara doesn't make sense. Event loops can be implemented with threads, and event loops can be used - via time slicing - to simulate threads. Let the discussion be practical
Ah, and the human mind? What event loop? Rather, the human mind is an event filter in a stream of events, driven by a singular conciousness, which condenses what is in his short time memory into what becomes it's own story. A phenomenon not very apt indeed to drive pro and cons of event loops or threads for a given computational problem.