Skip to content

Commit 0056306

Browse files
authored
fix: delete broken header file (#14096)
This PR deletes a `.h` file that doesn't compile. The `util/thread.h` it imports doesn't exist
1 parent ab97228 commit 0056306

1 file changed

Lines changed: 0 additions & 41 deletions

File tree

src/util/unlock_guard.h

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1 @@
1-
/*
2-
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
3-
Released under Apache 2.0 license as described in the file LICENSE.
41

5-
Author: Leonardo de Moura
6-
*/
7-
#pragma once
8-
#include "util/thread.h"
9-
namespace lean {
10-
/**
11-
\brief The class \c unlock_guard is a mutex wrapper that provides a
12-
convenient RAII-style mechanism for releasing a mutex for the
13-
duration of a scoped block.
14-
15-
It is the dual of lock_guard in the standard library.
16-
17-
Example:
18-
<code>
19-
{
20-
lock_guard<mutex> lock(m);
21-
...
22-
{
23-
unlock_guard unlock(m);
24-
...
25-
}
26-
...
27-
}
28-
</code>
29-
30-
\warning The calling thread must own the lock to m_mutex
31-
*/
32-
class unlock_guard {
33-
mutex & m_mutex;
34-
public:
35-
explicit unlock_guard(mutex & m):m_mutex(m) { m_mutex.unlock(); }
36-
unlock_guard(unlock_guard const &) = delete;
37-
unlock_guard(unlock_guard &&) = delete;
38-
unlock_guard & operator=(unlock_guard const &) = delete;
39-
unlock_guard & operator=(unlock_guard &&) = delete;
40-
~unlock_guard() { m_mutex.lock(); }
41-
};
42-
}

0 commit comments

Comments
 (0)