[Gbbopen-list] Q on SIGNAL-EVENT and AGENDA-SHELL

Dan Corkill corkill at gbbopen.org
Fri Aug 17 13:58:29 EDT 2007


> DO-EVFNS :after holds a non-recursive lock. What happens if signal-event 
> is called by a timer function while that lock is held? From looking at 
> the code it seems the non-recursive lock error would occur?

Timer functions (and other asynchronous things) should be set to run in
a separate thread/process.  Since you're using LW timer functions, I'd
recommend that a special "timer" process is used to run them.  (If I
recall correctly, LW timers run in the process that schedules them.  I
don't remember if LW guarantees that two timer functions scheduled by
the same process at about the same instance won't interleave, which
would also be an issue.)

The non-recursive lock in the Agenda Shell's DO-EVFNS :after method is
intended to spin if signal-event calls from two processes are
interfering.  It is non-recursive, because the behavior would be
unpredictable if the *same* process issued interfering signal-event
calls (via timers or interrupt functions, etc.)

-- Dan

BTW, Do you have any further insights into the simple

  (defparameter *timer* (mp:make-timer 'print '"HI")))
  (mp:schedule-timer-relative *timer* 10 10)

PROCESS-WAIT error?


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Gbbopen-list mailing list