Experimental Physics and Industrial Control System
Hi Lewis,
On 2013-06-28 J. Lewis Muir wrote:
> I don't get why one would care about removing all listeners that match.
> I can't think of a scenario where it would make sense to add more than
> one listener/pvt pair. To me, if someone does that, it's a bug. I'd be
> fine with the name still singular and it removing the first matching
> listener/pvt pair:
It may be a bug to do that, but all it takes is a subsystem that doesn't have
its own "already initialized" variable being started up twice. By deleting
all matching listeners and returning how many there were I'm making the
resulting code more robust against that kind of error while also allowing the
problem to be detected by the caller if s/he so desires. If you want to be
able to delete your listeners separately, pass a different value for the
private argument for each one.
- Andrew
--
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock
- References:
- Re: Problem in errlogRemoveListener Andrew Johnson
- Re: Problem in errlogRemoveListener Andrew Johnson
- Re: Problem in errlogRemoveListener J. Lewis Muir
- Navigate by Date:
- Prev:
Re: Problem in errlogRemoveListener J. Lewis Muir
- Next:
Re: Problem in errlogRemoveListener Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Problem in errlogRemoveListener J. Lewis Muir
- Next:
Re: Problem in errlogRemoveListener Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024