Resetting an announcer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Resetting an announcer

Sean P. DeNigris
Administrator
There is SubscriptionRegistry>>#reset, but in the examples I've seen, one has access to the announcer, but not the registry. How about:
  Announcer>>reset
      registry reset.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Resetting an announcer

Igor Stasenko
On 10 January 2012 20:27, Sean P. DeNigris <[hidden email]> wrote:
> There is SubscriptionRegistry>>#reset, but in the examples I've seen, one has
> access to the announcer, but not the registry. How about:
>  Announcer>>reset
>      registry reset.

do you think it is useful? i don't remember why we added this method..
it was almost a year ago :)

>
> --
> View this message in context: http://forum.world.st/Resetting-an-announcer-tp4283104p4283104.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Resetting an announcer

Sean P. DeNigris
Administrator
Igor Stasenko wrote
do you think it is useful? i don't remember why we added this method..
it was almost a year ago :)
Well, I found myself with subscriptions hanging around even though I subscribed weakly and did a gc, so it was useful in that situation.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Resetting an announcer

Igor Stasenko
On 10 January 2012 21:43, Sean P. DeNigris <[hidden email]> wrote:

>
> Igor Stasenko wrote
>>
>> do you think it is useful? i don't remember why we added this method..
>> it was almost a year ago :)
>>
>
> Well, I found myself with subscriptions hanging around even though I
> subscribed weakly and did a gc, so it was useful in that situation.
>

Well, this is like a backdoor interface. Since you going to reset all
subscriptions, not the only ones you know about,
because some other parts of image may add subscriptions, while your
application is totally unaware of that.
So resetting an announcer could make more harm than repairs :)

But of course for debugging, you may need things like that.
So, i guess if it is properly documented, it may be added.
Feel free then to add an new issue and provide a code with a nice
comment indicating
the most probable usage, and warning about misuse :)

> --
> View this message in context: http://forum.world.st/Resetting-an-announcer-tp4283104p4283342.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>



--
Best regards,
Igor Stasenko.