[Top][All Lists]

[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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]