[openbeosmediakit] Re: Aw: Broken locking in old AddOnManager

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: openbeosmediakit@xxxxxxxxxxxxx
  • Date: Fri, 23 Jan 2004 09:55:49 +0100 CET

Marcus Overhagen <marcusoverhagen@xxxxxxxx> wrote:
> > When you lock again in 2), the same reader could have been added in 
> > the 
> > meantime; you would have to check for its existence again.
> > It's better in this case to hold the lock during the whole time, 
> > given 
> > that the whole process is relatively light-weight.
> Well the idea was that RegisterReader() is only called from 
> RegisterAddOns()
> which is only executed once during startup (and only from a single 
> thread).
> The lock is only used to preserve list integrity (Rewind() changes 
> internal list 
> pointer).
> 
> As soon as we implement node watching to dynamically register/
> unregister 
> plugins, will get more complicated, but I still think this locking is 
> ok.

Ah, okay, then I just misunderstand this. Anyway the RegisterReader() 
and RegisterDecoder() are now locked during their whole lifetime, which 
should be needed for synchronization once we can also update add-ons.

Bye,
   Axel.


Other related posts: