Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: How to kill an svdrp connection from vdr ?



Klaus Schmidinger wrote:

Well, it _is_ more complex than plain numbers, isn't it? ;-)

Besides, this would still leave the problem unsolved that changes could be made
from the menu and an SVDRP connection at the same time - which I have to
admit currently _is_ still a loophole...
I dont think that this is too much of a problem.

Deleting / moving an Item will simply result in either the gui or the svdr opteration to fail.

But, the only way to ever handle this in a nice way will to force one interface for everying. Just one way to access / loop over / enumerate such objects and make this interface safe.


What I usually do is have some kind of object handler where one simply can get the object in a exclusive or none exclusive form.

All of this can be done with some clever c++ tricks without too much hassle (Eg you can use some meta lock object which will automatically unlock the object once the meta lock object's destructor is called.

If you're concerned about performance, imho you do not even need real locking but could use spin locking with thread yielding since most of the time you'd only have to lock for very short amounts of time.

kind regards Philip




Home | Main Index | Thread Index