[interfacekit] Re: deadlock with BApplication/BWindow
- From: Adi Oanca <adioanca@xxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Sat, 12 Mar 2005 20:10:55 +0200
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?
Adi.
- Follow-Ups:
- [interfacekit] Re: deadlock with BApplication/BWindow
- From: Adi Oanca
- 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
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
_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?
Adi.
- [interfacekit] Re: deadlock with BApplication/BWindow
- From: Adi Oanca
- [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