[Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
Hello, here a situation, with which we can deal in more safer manner: Suppose you have a weak registry, populated by different objects and their executors. Now, when some of them died, a weak registry performs finalization. The potential danger is , that if there's an error triggered by some ex

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
On 11 October 2010 14:40, Igor Stasenko wrote: > Hello, > > here a situation, with which we can deal in more safer manner: > > Suppose you have a weak registry, populated by different objects and > their executors. > > Now, when some of them died, a weak registry performs finalization. > > The pot

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Levente Uzonyi
On Mon, 11 Oct 2010, Igor Stasenko wrote: Hello, here a situation, with which we can deal in more safer manner: Suppose you have a weak registry, populated by different objects and their executors. Now, when some of them died, a weak registry performs finalization. The potential danger is ,

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
al-purpose Squeak developers list Subject: Re: [Pharo-project] Another finalization concern: error handling On Mon, 11 Oct 2010, Igor Stasenko wrote: > Hello, > > here a situation, with which we can deal in more safer manner: > > Suppose you have a weak registry, populated by diff

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Levente Uzonyi
opers list Subject: Re: [Pharo-project] Another finalization concern: error handling On Mon, 11 Oct 2010, Igor Stasenko wrote: Hello, here a situation, with which we can deal in more safer manner: Suppose you have a weak registry, populated by different objects and their executors. Now,

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
ia.fr [pharo-project-boun...@lists.gforge.inria.fr] On Behalf Of Levente Uzonyi [le...@elte.hu] Sent: Monday, October 11, 2010 10:24 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Another finalization concern: error handling On Mon, 11 Oct 2010, Schwab,Wilhelm K wrote: >

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
On 11 October 2010 17:24, Levente Uzonyi wrote: > On Mon, 11 Oct 2010, Schwab,Wilhelm K wrote: > >> Levente, >> >> A similar discussion arose around Dolphin's event (#trigger*) mechanism. >>  My recollection is that it was not fully addressed due to performance >> concerns.  Forking and error hand

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Levente Uzonyi
ia.fr [pharo-project-boun...@lists.gforge.inria.fr] On Behalf Of Levente Uzonyi [le...@elte.hu] Sent: Monday, October 11, 2010 10:24 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Another finalization concern: error handling On Mon, 11 Oct 2010, Schwab,Wilhelm K wrote:

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Levente Uzonyi
On Mon, 11 Oct 2010, Igor Stasenko wrote: On 11 October 2010 17:24, Levente Uzonyi wrote: On Mon, 11 Oct 2010, Schwab,Wilhelm K wrote: Levente, A similar discussion arose around Dolphin's event (#trigger*) mechanism.  My recollection is that it was not fully addressed due to performance conc

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
ect: Re: [Pharo-project] Another finalization concern: error handling On 11 October 2010 17:24, Levente Uzonyi wrote: > On Mon, 11 Oct 2010, Schwab,Wilhelm K wrote: > >> Levente, >> >> A similar discussion arose around Dolphin's event (#trigger*) mechanism. >>

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
On 11 October 2010 17:34, Schwab,Wilhelm K wrote: > Levente, > > Ok, but just because the system saves us at the last instant does not mean > that we should be going out of our way to multiply free external resources.   > Files are well known to the vm; other things (GSL vectors/matrices comes to

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
[pharo-project-boun...@lists.gforge.inria.fr] On Behalf Of Levente Uzonyi [le...@elte.hu] Sent: Monday, October 11, 2010 10:59 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Another finalization concern: error handling On Mon, 11 Oct 2010, Schwab,Wilhelm K wrote

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Stéphane Ducasse
Argh >>> > > ObjectFinalizer>>finalize > "Finalize the resource associated with the receiver. This message > should only be sent during the finalization process. There is NO > garantuee that the resource associated with the receiver hasn't been > free'd before so take care that you don

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Henrik Johansen
On Oct 11, 2010, at 4:10 13PM, Schwab,Wilhelm K wrote: > > I am far more worried about having multiple executors per object (when did > p=malloc();free(p);free(p);free(p) become good style?) than I am about > getting the finalizer process itself completely robust at this point. > > Bill I fa

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
On 11 October 2010 18:23, Henrik Johansen wrote: > > On Oct 11, 2010, at 4:10 13PM, Schwab,Wilhelm K wrote: > >> >> I am far more worried about having multiple executors per object (when did >> p=malloc();free(p);free(p);free(p) become good style?) than I am about >> getting the finalizer proces

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
, 2010 11:23 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Another finalization concern: error handling On Oct 11, 2010, at 4:10 13PM, Schwab,Wilhelm K wrote: > > I am far more worried about having multiple executors per object (when did > p=malloc();free(p);free(

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
Meanwhile, i'll try to implement two test cases for WeakRegistryTest. One, should cover following: coll := OrderedCollection new. obj := Object new. wrapper := WeakArray with: obj. coll add: wrapper. obj toFinalizeSend: #remove: to: coll with: wrapper. obj toFinalizeSend: #remove: to: coll with:

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
...@gmail.com] Sent: Monday, October 11, 2010 12:14 PM To: Pharo-project@lists.gforge.inria.fr; The general-purpose Squeak developers list Subject: Re: [Pharo-project] Another finalization concern: error handling Meanwhile, i'll try to implement two test cases for WeakRegistryTest. One, s

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Levente Uzonyi
...@lists.gforge.inria.fr [pharo-project-boun...@lists.gforge.inria.fr] On Behalf Of Henrik Johansen [henrik.s.johan...@veloxit.no] Sent: Monday, October 11, 2010 11:23 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Another finalization concern: error handling On Oct 11, 2010, at 4:10 13PM

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
oject@lists.gforge.inria.fr Subject: Re: [Pharo-project] Another finalization concern: error handling On Mon, 11 Oct 2010, Schwab,Wilhelm K wrote: > Henry, > > Ok, what valid use of multiple executors have I missed? I described it earlier how the AXAnnouncements project uses this feature. Lev

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
t-boun...@lists.gforge.inria.fr] On Behalf Of Igor Stasenko > [siguc...@gmail.com] > Sent: Monday, October 11, 2010 12:14 PM > To: Pharo-project@lists.gforge.inria.fr; The general-purpose Squeak > developers list > Subject: Re: [Pharo-project] Another finalization concern: error hand

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
boun...@lists.gforge.inria.fr > [pharo-project-boun...@lists.gforge.inria.fr] On Behalf Of Igor Stasenko > [siguc...@gmail.com] > Sent: Monday, October 11, 2010 12:14 PM > To: Pharo-project@lists.gforge.inria.fr; The general-purpose Squeak > developers list > Subject:

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
:02 PM > To: Pharo-project@lists.gforge.inria.fr > Subject: Re: [Pharo-project] Another finalization concern: error handling > > On 11 October 2010 19:28, Schwab,Wilhelm K wrote: >> Sig, >> >> The Dolphin approach is to restart any of the finalizer, main, timer, idler

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
ubject: Re: [Pharo-project] Another finalization concern: error handling On 11 October 2010 20:04, Schwab,Wilhelm K wrote: > Sig, > > Understood, but are they all that different? The ones that were served ahead > of the error should stay that way (proper recording of same is what ne

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
On 11 October 2010 21:07, Schwab,Wilhelm K wrote: > Sig, > > As a friend here: when did I say I'd remove all?  Remove and process one at a > time.  I will admit to having a bias toward doing this with a single executor > per object, but even if multiples turn out to have value (need to hunt down

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Levente Uzonyi
On Mon, 11 Oct 2010, Igor Stasenko wrote: On 11 October 2010 21:07, Schwab,Wilhelm K wrote: Sig, As a friend here: when did I say I'd remove all?  Remove and process one at a time.  I will admit to having a bias toward doing this with a single executor per object, but even if multiples turn

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
October 11, 2010 2:36 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Another finalization concern: error handling On 11 October 2010 21:07, Schwab,Wilhelm K wrote: > Sig, > > As a friend here: when did I say I'd remove all? Remove and process one at a > ti

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
On 11 October 2010 22:49, Schwab,Wilhelm K wrote: > Sig, > > The most important words in there are "critical section."  Carry on :) > Oh, please. This is not too hard to code. My mind rolling around following choice(s) (there may be others i don't see). What would be a proper way to handle erro

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
: pharo-project-boun...@lists.gforge.inria.fr [pharo-project-boun...@lists.gforge.inria.fr] On Behalf Of Igor Stasenko [siguc...@gmail.com] Sent: Monday, October 11, 2010 4:17 PM To: Pharo-project@lists.gforge.inria.fr; The general-purpose Squeak developers list Subject: Re: [Pharo-project] Anoth

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Igor Stasenko
> > > From: pharo-project-boun...@lists.gforge.inria.fr > [pharo-project-boun...@lists.gforge.inria.fr] On Behalf Of Igor Stasenko > [siguc...@gmail.com] > Sent: Monday, October 11, 2010 4:17 PM > To: Pharo-project@lists.gforge.inria.fr; The

Re: [Pharo-project] Another finalization concern: error handling

2010-10-11 Thread Schwab,Wilhelm K
tasenko [siguc...@gmail.com] Sent: Monday, October 11, 2010 6:35 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Another finalization concern: error handling On 12 October 2010 00:32, Schwab,Wilhelm K wrote: > Sig, > > How hard it is or isn't is not nearly as impo

Re: [Pharo-project] Another finalization concern: error handling

2010-10-12 Thread Henrik Johansen
Den 11. okt. 2010 kl. 22:17 skrev Igor Stasenko : > > Also, i used #ensure: and #ifCurtailed: but i tend to forget where > they are applicable and how. > So, little help in this regard will be wellcome. Ensure: block always execute. IfCurtailed blocks only run if an error is encountered, or th

Re: [Pharo-project] Another finalization concern: error handling

2010-10-12 Thread Henrik Johansen
On Oct 11, 2010, at 10:17 18PM, Igor Stasenko wrote: > On 11 October 2010 22:49, Schwab,Wilhelm K wrote: >> Sig, >> >> The most important words in there are "critical section." Carry on :) >> > > Oh, please. This is not too hard to code. > > My mind rolling around following choice(s) (ther

Re: [Pharo-project] Another finalization concern: error handling

2010-10-12 Thread Igor Stasenko
On 12 October 2010 14:25, Henrik Johansen wrote: > > On Oct 11, 2010, at 10:17 18PM, Igor Stasenko wrote: > >> On 11 October 2010 22:49, Schwab,Wilhelm K wrote: >>> Sig, >>> >>> The most important words in there are "critical section."  Carry on :) >>> >> >> Oh, please. This is not too hard to co

Re: [Pharo-project] Another finalization concern: error handling

2010-10-12 Thread Henrik Johansen
On Oct 12, 2010, at 2:00 42PM, Igor Stasenko wrote: > On 12 October 2010 14:25, Henrik Johansen > wrote: >> >> On Oct 11, 2010, at 10:17 18PM, Igor Stasenko wrote: >> >>> On 11 October 2010 22:49, Schwab,Wilhelm K wrote: Sig, The most important words in there are "critical se

Re: [Pharo-project] Another finalization concern: error handling

2010-10-12 Thread Igor Stasenko
On 12 October 2010 15:33, Henrik Johansen wrote: > > On Oct 12, 2010, at 2:00 42PM, Igor Stasenko wrote: > >> On 12 October 2010 14:25, Henrik Johansen >> wrote: >>> >>> On Oct 11, 2010, at 10:17 18PM, Igor Stasenko wrote: >>> On 11 October 2010 22:49, Schwab,Wilhelm K wrote: > Sig, >>