Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: third_party/crashpad/crashpad/util/synchronization/semaphore.h

Issue 2825103002: Update Crashpad to b8aaa22905308cc400f880006a84dddac834bd6b (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/util/synchronization/semaphore.h
diff --git a/third_party/crashpad/crashpad/util/synchronization/semaphore.h b/third_party/crashpad/crashpad/util/synchronization/semaphore.h
index ac77cb7cbdf852b91ec5fa61fd9adef56e5d3893..494796399418d3563aff522eaeba889f8d4bb062 100644
--- a/third_party/crashpad/crashpad/util/synchronization/semaphore.h
+++ b/third_party/crashpad/crashpad/util/synchronization/semaphore.h
@@ -15,6 +15,8 @@
#ifndef CRASHPAD_UTIL_SYNCHRONIZATION_SEMAPHORE_H_
#define CRASHPAD_UTIL_SYNCHRONIZATION_SEMAPHORE_H_
+#include <limits>
+
#include "build/build_config.h"
#if defined(OS_MACOSX)
@@ -30,6 +32,10 @@ namespace crashpad {
//! \brief An anonymous in-process counting sempahore.
class Semaphore {
public:
+ //! \brief A TimedWait() argument that causes an indefinite wait.
+ static constexpr double kIndefiniteWait =
+ std::numeric_limits<double>::infinity();
+
//! \brief Initializes the semaphore.
//!
//! \param[in] value The initial value of the semaphore.
@@ -51,7 +57,8 @@ class Semaphore {
//! \brief Performs a timed wait (or “procure”) operation on the semaphore.
//!
//! \param[in] seconds The maximum number of seconds to wait for the operation
- //! to complete.
+ //! to complete. If \a seconds is #kIndefiniteWait, this method behaves as
+ //! Wait(), and will not time out.
//!
//! \return `false` if the wait timed out, `true` otherwise.
//!

Powered by Google App Engine
This is Rietveld 408576698