Re: [eclipse-users] Suspension lists

From: Kish Shen <kisshen_at_...5...>
Date: Thu, 06 Sep 2007 17:27:19 +0100
Hi Malcolm,

Malcolm Ryan wrote:
> I'm programming a data type which represents a list of non-fixed  
> length. The length is represented as an ic variable, and as its lower  
> bound increases new element variables are added to the list. I want  
> to provide a suspension list and a port to notify watchers of this  
> event. I've got the code mostly working, but am facing one problem. I  
> want to close the port when the list is instantiated, but at the  
> moment I appear to be doing it too soon -- other demons are still  
> waiting to write to the port. When they try, they fail (and what's  
> more annoying: they fail silently).
> These demons should have higher priority than the instantiation  
> demon, but because they themselves are triggered by events in lib(ic)  
> and lib(ic_sets), they do not seem to be happening early enough. Is  
> there a way to delay until a suspension list is empty? Or is there  
> another way to avoid this problem?
> Malcolm
> --
>             "Cleanliness is not next to godliness nowadays,
>                  for cleanliness is made an essential
>                and godliness is regarded as an offence.
>                                      - G.K.Chesterton, On Lying in Bed
I am not quite sure I understand what you are trying to do completely, 
and since you mention priority yourself, I am not sure why you don't use 
this to make sure that the goal that close the port (which I assume is 
implemented as a suspension goal on the suspension list you mentioned?) 
have a low priority so that the other demons would finish their 
notifications first? [I think the priorities used by lib(ic) are all 
relatively high, precisely to allow user goals to have lower priorities 
-- I would guess a priority of 10 is probably lower than anything ic uses]



> _______________________________________________
> ECLiPSe-Users mailing list
> ECLiPSe-Users_at_...2...
Received on Thu Sep 06 2007 - 17:27:35 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 20 2019 - 00:14:49 CEST