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

Paul Werkowski pw at snoopy.mv.com
Fri Aug 17 14:24:44 EDT 2007


Dan Corkill wrote:
>> 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

My KS execution functions now start the timers. I guess I can have the
timer function spawn a thread to call signal-event, or as you suggest,
a separate thread for that purpose.

> 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?
> 

No, it hasn't happened again. Possibly I had some old compiled files
that did not have up to date macro expansions. I did recompile 
everything yesterday but I don't remember if I did that in between 
failures and successes.

Thanks,
Paul

-- 
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