[vdr] Re: status class extensions?
marcel.wiesweg at gmx.de
Tue Sep 27 12:44:23 CEST 2005
> > I've been stumbling over this recently, too. AFAIK the channels list is
> > thread safe already, if the plugin calls Lock() and Unlock() on the
> > Channels object properly. It would be nice if the other lists could
> > receive these capabilities too :)
Locking is there for cChannels, but it is not safe to store a cChannel *
pointer (may be deleted any time) nor a channel number (may be moved or
deleted any time). The only safe way currently seems to be storing a channel
Although all this is not a practical problem for anyone now, it may well be
one day so there should be some thought put into this.
I think when there is no time pressure (1.5 series) there should be a clear
statement in the documentation of each class which global structures and
objects are thread-safe to access and to store and which are main-thread only
(OSD, cControl), and mechanisms to track changes.
Think of creation, change and deletion of timers and channels, or
hot-pluggable devices like those new DVB-T boxes which are plugged in and
unplugged at any time.
> Let's think about this after version 1.4.
> I just _have_ to be increasingly restrictive with changes, or we'll
> never get anywhere near a stable 1.4 ;-)
More information about the vdr