[interfacekit] Re: deadlock with BApplication/BWindow
- From: Adi Oanca <adioanca@xxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Sat, 12 Mar 2005 20:38:54 +0200
Adi Oanca wrote:
Ingo Weinhold wrote:
_Lock(BLooper* loop, port_id port, bigtime_t timeout)
is always called with 'this' and '-1'
so 'loop' will always be valid. IsLooperValid() checks for 'loop' in
the global
list and if not, return error. But this will always return true,
unless the looper
has been deleted and this is an illegal call, in which case it's
right to fail with
a segmentation fault.
Maybe I am missing something, and if that's the case, please tell
me what.
If not, can we please remove the above lines? They are useless and
introduce
lots of CPU cycles.
Your assumption that invoking BLooper::Lock() on an invalid looper is
not allowed is not correct. It is completely OK to do that. Just like
calling PostMessage().
Why? It would realise nothing. And it's wrong. Why do you say it's
correct?
I got it, it can say if the looper is still valid or not. :-)
bye,
Adi.
- Follow-Ups:
- [interfacekit] Re: deadlock with BApplication/BWindow
- From: Ingo Weinhold
- References:
- [interfacekit] deadlock with BApplication/BWindow
- From: Adi Oanca
- [interfacekit] Re: deadlock with BApplication/BWindow
- From: Adi Oanca
- [interfacekit] Re: deadlock with BApplication/BWindow
- From: Ingo Weinhold
- [interfacekit] Re: deadlock with BApplication/BWindow
- From: Adi Oanca
Other related posts:
- » [interfacekit] deadlock with BApplication/BWindow
- » [interfacekit] Re: deadlock with BApplication/BWindow
- » [interfacekit] Re: deadlock with BApplication/BWindow
- » [interfacekit] Re: deadlock with BApplication/BWindow
- » [interfacekit] Re: deadlock with BApplication/BWindow
- » [interfacekit] Re: deadlock with BApplication/BWindow
- » [interfacekit] Re: deadlock with BApplication/BWindow
- » [interfacekit] Re: deadlock with BApplication/BWindow
- » [interfacekit] Re: deadlock with BApplication/BWindow
- » [interfacekit] Re: deadlock with BApplication/BWindow
- » [interfacekit] Re: deadlock with BApplication/BWindow
Ingo Weinhold wrote:
_Lock(BLooper* loop, port_id port, bigtime_t timeout)
is always called with 'this' and '-1'
so 'loop' will always be valid. IsLooperValid() checks for 'loop' in the global
list and if not, return error. But this will always return true, unless the looper
has been deleted and this is an illegal call, in which case it's right to fail with
a segmentation fault.
Maybe I am missing something, and if that's the case, please tell me what.
If not, can we please remove the above lines? They are useless and introduce
lots of CPU cycles.
Your assumption that invoking BLooper::Lock() on an invalid looper is not allowed is not correct. It is completely OK to do that. Just like calling PostMessage().
Why? It would realise nothing. And it's wrong. Why do you say it's correct?
I got it, it can say if the looper is still valid or not. :-)
bye, Adi.
- [interfacekit] Re: deadlock with BApplication/BWindow
- From: Ingo Weinhold
- [interfacekit] deadlock with BApplication/BWindow
- From: Adi Oanca
- [interfacekit] Re: deadlock with BApplication/BWindow
- From: Adi Oanca
- [interfacekit] Re: deadlock with BApplication/BWindow
- From: Ingo Weinhold
- [interfacekit] Re: deadlock with BApplication/BWindow
- From: Adi Oanca