[e-lang] multiway when-catch

Kevin Reid kpreid at mac.com
Mon Oct 29 15:58:46 EDT 2007


On Oct 29, 2007, at 15:36, Rob Withers wrote:
>> From: "Kevin Reid" <kpreid at mac.com>
>> I think your promiseSet corresponds to the components produced by  
>> promiseAllFulfilled, which multiway-when uses, as you will see in  
>> the expansion. I recommend that you simply compile/translate  
>> promiseAllFulfilled.emaker to your platform, as it is entirely non- 
>> primitive and well-designed.
>
> I was unable to find promiseAllFulfilled.emaker, but I am still  
> looking.

esrc/org/erights/e/elang/interp/

>> Particularly, there should not be any weak references involved, so  
>> GC is irrelevant.
>
> I have strong references.  I think I may have fixed the problem I  
> was having by passing the promiseSet as an argument to the  
> #whenResolved: msgs I send to each promise.   I am now resolving  
> the promiseSet and getting into the block.

This sounds like inadequate facets. What authority does a promiseSet  
grant to its holders? If it includes the promises it holds, then this  
is wrong, as the promises should not learn of each other by being  
used together in a when.

Could you explain what a promiseSet is? It does not sound like any  
concept that exists in E, and so I am suspicious of its necessity. Is  
it primitive?

> One other question I had, I once saw code that conditioned a  
> promise to resolve within a certain timeout, otherwise it broke.   
> Do you happen to know code that could do this?

The final example (building on previous ones) in <http:// 
www.erights.org/elang/concurrency/race.html> .

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list