Elf wrote:
fwiw, threads are not always avoidable
...
it would not be possible to have equivalent functionality without
threading, nor would the performance requirements be attainable
without threads.
"A computer is a state machine. Threads are for people who can't
program state machines." (Alan Cox)
A bold statement, but I kind of agree. Except maybe for when you seek
to simulate many random, unpredictable, asynchronous processes,
threads are just a quick hack. A hand-crafted, event-based solution
is usually more efficient, easier to get right and much easier to debug.
If you lack the needed OS primitives (select, non-blocking I/O, etc.)
or if you need to cope with a bad OS, then threads might be the only
way to go, but those are cases that call for ugly hacks anyway.
What is it you couldn't do in the raw-sockets egg without threads?
Tobia
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users