[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Quick Process Note
Date: Tue, 1 Oct 1991 02:09 EDT
From: kddlab!atr-la.atr.co.jp!myers@uunet.UU.NET (John K. Myers)
(process:block-process "I'm Blocked" #'true) doesn't work,
the process never goes to sleep in the first place.
>From the middle of p.8:
When a process goes blocked and provides a verify-function, the
verify-function is tested before the process goes blocked. If it
returns a non-NIL value the process does not go blocked.
If you want a verify function that will be false just the first time
it's tested, but be true from then on, you could use a closure:
(let ((value nil))
(process:block-process "I'm blocked"
#'(lambda () (prog1 value (setq value t)))))
It's generally not very useful to have such a general verify-function;
it really should verify that the appropriate state has been reached.
This is because you can never be sure why you've received some random
wakeup; for instance, when input becomes available on a stream a wakeup
is sent to the last process that used that stream, and burying a window
sends a wakeup to the process associated with the window. The purpose
of the verify-function is to distinguish extraneous wakeups from the one
you're actually waiting for.
barmar