[haiku-commits] Re: haiku: hrev45507 - src/add-ons/kernel/network/notifications

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 15 Apr 2013 22:26:59 -0400

On Mon, Apr 15, 2013 at 9:26 PM, Rene Gollent <anevilyak@xxxxxxxxx> wrote:
> Interestingly, when UnregisterService calls ReleaseReference, the base
> class version of LastReferenceReleased seems to get called rather than
> the overridden version that NetNotificationService defines, resulting
> an attempt to delete the object, which leads to a double lock. Not
> sure what to do about that one at the moment, so I've pulled that
> ReleaseReference() call back out for now since we're otherwise
> unbootable.

Perhaps it would make sense to make the registration/unregistration
with the notification manager explicit calls that the notification
services have to invoke when they're ready, rather than the current
approach of being done behind the scenes by the base ctor/dtor? While
slightly less convenient, it would both get rid of the previously
mentioned race with regards to acquiring a ref to an incomplete object
at construction time, and it would also allow greater control over the
order of operations, which would let us resolve the issue being
encountered here.



Other related posts: