This is the mail archive of the
mailing list for the libstdc++ project.
Re: [patch] Fix std::try_lock behaviour
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 1 Oct 2014 13:36:08 +0100
- Subject: Re: [patch] Fix std::try_lock behaviour
- Authentication-results: sourceware.org; auth=none
- References: <20140922145434 dot GB2669 at redhat dot com>
On 22/09/14 15:54 +0100, Jonathan Wakely wrote:
When I fixed std::try_lock a few years ago I misread the spec,
exceptions should not be caught and turned into a return value.
Tested x86_64-linux, committed to trunk.
... and also the 4.9 branch.
* include/std/mutex (try_lock): Do not swallow exceptions.
* testsuite/30_threads/try_lock/4.cc: Fix test.