aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/thread-pool.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:36:23 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:46:02 -0500
commitc583a2520616c2736cffc389c89a48b159366e6c (patch)
treeb4925f26506fcee96c16119431c01760f05db95d /gdbsupport/thread-pool.h
parentca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff)
downloadbinutils-users/simark/clang-format.zip
binutils-users/simark/clang-format.tar.gz
binutils-users/simark/clang-format.tar.bz2
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdbsupport/thread-pool.h')
-rw-r--r--gdbsupport/thread-pool.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/gdbsupport/thread-pool.h b/gdbsupport/thread-pool.h
index 013c6ab..847df64 100644
--- a/gdbsupport/thread-pool.h
+++ b/gdbsupport/thread-pool.h
@@ -57,11 +57,7 @@ template<typename T>
class future
{
public:
-
- explicit future (T value)
- : m_value (std::move (value))
- {
- }
+ explicit future (T value) : m_value (std::move (value)) {}
future () = default;
future (future &&other) = default;
@@ -69,12 +65,11 @@ public:
future &operator= (future &&other) = default;
future &operator= (const future &other) = delete;
- void wait () const { }
+ void wait () const {}
T get () { return std::move (m_value); }
private:
-
T m_value;
};
@@ -84,13 +79,12 @@ template<>
class future<void>
{
public:
- void wait () const { }
- void get () { }
+ void wait () const {}
+ void get () {}
};
#endif /* CXX_STD_THREAD */
-
/* A thread pool.
There is a single global thread pool, see g_thread_pool. Tasks can
@@ -150,7 +144,6 @@ public:
}
private:
-
thread_pool () = default;
#if CXX_STD_THREAD
@@ -180,6 +173,6 @@ private:
#endif /* CXX_STD_THREAD */
};
-}
+} // namespace gdb
#endif /* GDBSUPPORT_THREAD_POOL_H */