[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Nicer way to wake sit-for up?
From: |
spamfilteraccount |
Subject: |
Nicer way to wake sit-for up? |
Date: |
8 Jun 2006 03:31:33 -0700 |
User-agent: |
G2/0.2 |
I have a code where the command loop executes a command which is
waiting for arriving data with sit-for. When the data arrives from the
network a callback is invoked and I wake sit-for up with a dummy event
like this:
the callback:
...
(setq unread-command-events (cons 'data-arrived
unread-command-events))
...
the command:
...
(sit-for 5)
(if (eq (car unread-command-events) 'data-arrived)
(setq unread-command-events (cdr unread-command-events)))
...
It works, but feels a bit clumsy. Is it a simpler or nicer way to do
this?
- Nicer way to wake sit-for up?,
spamfilteraccount <=