Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
699a74b5
Commit
699a74b5
authored
Nov 03, 2014
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix code to include unique_lock destructor
parent
368392ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
libcaf_core/caf/mutex.hpp
libcaf_core/caf/mutex.hpp
+6
-6
No files found.
libcaf_core/caf/mutex.hpp
View file @
699a74b5
...
...
@@ -93,7 +93,7 @@ class unique_lock {
:
m_mtx
{
&
mtx
},
m_owns
{
mtx
.
try_lock
()
}
{
}
inline
unique_lock
(
mutex_type
&
mtx
,
adopt_lock_t
)
:
m_mtx
{
&
mtx
},
m_owns
{
true
}
{
}
template
<
class
Clock
,
class
Duration
>
//
template<class Clock, class Duration>
// inline unique_lock(mutex_type& mtx,
// const std::chrono::time_point<Clock,
// Duration>& timeout_time)
...
...
@@ -102,11 +102,11 @@ class unique_lock {
// inline unique_lock(mutex_type& mtx,
// const chrono::duration<Rep,Period>& timeout_duration)
// : m_mtx{&mtx}, m_owns{mtx.try_lock_for(timeout_duration)} { }
//
inline ~unique_lock() {
//
if (m_owns) {
//
m_mtx->unlock();
//
}
//
}
inline
~
unique_lock
()
{
if
(
m_owns
)
{
m_mtx
->
unlock
();
}
}
inline
unique_lock
(
unique_lock
&&
lock
)
noexcept
:
m_mtx
{
lock
.
m_mtx
},
m_owns
{
lock
.
m_owns
}
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment