Closed janondrusek closed 1 year ago
Support for pos_inf was not intended in the library (it was not even tested), but it seems that posix_ptime has a converting constructor for pos_inf and the trick worked. When the interface was templated to support different time libraries (std, boost, date_time), then the converting constructor does not kick in. Adding support for pos_inf and friends would make again Interprocess dependent on date-time which, something that we want to avoid. I've tried some workarounds but the solution does not seem plausible or at least easy. So I'm afraid that support for pos_inf was lost in the transition creating an unintended breaking change...
Strangely, Fast-DDS is using a timed function with the infinite timeout to implement a blocking lock. I can suggest changing
semaphores_pool_[sem_index].sem.timed_wait(boost::posix_time::pos_infin);
with
semaphores_pool_[sem_index].sem.timed_wait(boost::posix_time::ptime(boost::posix_time::pos_infin));
that should work with all versions of Boost.Interprocess
In my recent effort to upgrade from boost 1.69 I discovered a change of behavior after the commit 30d5005ac627b36c122e69c86cf518aaaadd92ab. Is my expectation of
boost::posix_time::pos_infin
to pass the check in semaphore_wrapper incorrect?One example of a public library relying on
pos_infin
Fast-DDSAttempts to build the library with a recent boost results in:
I attempted to add a repro case. What would be the best way to approach a fix? Thanks!