Am 20.08.2011 12:16, schrieb Klaus Schmidinger:
> On 19.08.2011 20:48, Udo Richter wrote:
>> Sure, however QueueMessage does not wait and does not return an user key
> That's by design ;-)
> A background thread is not supposed to do this!
Osdserver has no other choice. From the main thread, Osdserver could
only react once a second, meaning that an average osdserver menu would
need 30 seconds to appear. Thus, a completely backgrounded network
thread is a must.
Osdserver solves this with some complex own locking mechanisms, dirty
tricks to force a wakeup of the VDR main thread, and threadsafe shadow
copies of non-threadsafe data structures. A global lock would make
things a lot easier.
>> Osdserver exports all of the message functions, including
> Well, I guess it shouldn't.
Would mean, osdserver clients cannot do a simple yes/no query. Not an
> The kernel developers only recently got rid of this, and they had good
> reasons to do so, I guess. I wouldn't want to do that in VDR.
You're free to implement a fine-grained locking for all non-threadsafe
data structures, like the kernel guys did, but IMHO one big lock is
better than none. ;)
Anyway, Osdserver is fixed now, and uses a callback from MainThreadHook
to do the Skins.Message() call.
vdr mailing list