[TUHS] Threads vs... not

Larry McVoy lm at mcvoy.com
Thu Aug 5 08:02:08 AEST 2021


>From http://mcvoy.com/lm/quotes.html

     A computer is a state machine. Threads are for people who can't program
     state machines. 

     Alan Cox 


On Wed, Aug 04, 2021 at 05:48:46PM -0400, Lawrence Stewart wrote:
> What do folks think about event-driven programming as a substitute for threads in UI and process control settings?
> 
> I wrote the service processor code for the Sicortex Machines using libevent.a and I thought it was very lightweight and fairly easy to think about. (This was a thing running on ucLinux on a tiny 16 MB coldfire that managed the consoles and power supplies and temp sensors and JTAG access and booting and so forth.)
> 
> Tk (IIRC) has a straightforward event driven model for UI interactions.
> 
> Meanwhile, the dropbox plugin for my Mac has 120 threads running.  WTF?
> 
> This was triggered by the fork/spawn discussion.
> 
> -Larry
> (started with Unix at V6 on an 11/34)

-- 
---
Larry McVoy            	     lm at mcvoy.com             http://www.mcvoy.com/lm 


More information about the TUHS mailing list