The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Larry McVoy <lm@mcvoy.com>
To: Lawrence Stewart <stewart@serissa.com>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] Threads vs... not
Date: Wed, 4 Aug 2021 15:02:08 -0700	[thread overview]
Message-ID: <20210804220208.GK9074@mcvoy.com> (raw)
In-Reply-To: <B3227CA8-0477-4424-9705-870430233DC7@serissa.com>

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 

  reply	other threads:[~2021-08-04 22:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 21:48 Lawrence Stewart
2021-08-04 22:02 ` Larry McVoy [this message]
2021-08-04 22:41   ` John Cowan
2021-08-04 22:51     ` Larry McVoy
2021-08-05 20:32       ` Clem Cole
2021-08-06  0:55       ` Dan Cross
2021-08-04 22:13 ` Anthony Martin
2021-08-05 23:02 ` Bakul Shah
2021-08-06 14:19   ` Steffen Nurpmeso
2021-08-06 14:43     ` John Cowan
2021-08-06 15:12       ` Steffen Nurpmeso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210804220208.GK9074@mcvoy.com \
    --to=lm@mcvoy.com \
    --cc=stewart@serissa.com \
    --cc=tuhs@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).