Subject: Re: [boost] [Interprocess] message_queue should use timed_lock
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2012-12-06 10:48:54
El 05/12/2012 20:23, Hartmut Kaiser escribió:
> (mq_ is a shared_ptr<message_queue>)
> here both ends sit forever inside the timed_receive/timed_send function,
> both waiting to acquire a lock (ipc/message_queue.hpp, lines 702 and 799),
> which is held by a third participating process. Shouldn't this lock be using
> a timed_lock to allow to maintain the API post condition (i.e. returning
> after the given amount of time in any case)?
Unless there is a bug (and this seems a bug), the internal lock is only
hold to test queue internals and released on the condition variable if
blocking is needed, so no process should be blocked on the mutex forever.