work around broken try_lock_for in gcc
Summary: timed_mutex::try_lock_for is broken in gcc 4.8 (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54562), so this diff adds a workaround using try_lock_until. The internal implementation of try_lock_for converts to try_lock_until, but it uses the steady_clock instead of the system_clock as its time base. In some gcc versions these are the same clock so it works okay, but not in all. Test Plan: unit tests Reviewed By: delong.j@fb.com FB internal diff: D1108584
Showing
Please register or sign in to comment