You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 11:23:22 UTC
svn commit: r1132311 -
/incubator/mesos/trunk/third_party/libprocess/future.hpp
Author: benh
Date: Sun Jun 5 09:23:22 2011
New Revision: 1132311
URL: http://svn.apache.org/viewvc?rev=1132311&view=rev
Log:
Formating changes.
Modified:
incubator/mesos/trunk/third_party/libprocess/future.hpp
Modified: incubator/mesos/trunk/third_party/libprocess/future.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/future.hpp?rev=1132311&r1=1132310&r2=1132311&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/future.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/future.hpp Sun Jun 5 09:23:22 2011
@@ -18,8 +18,8 @@ public:
Future(Promise<T>* promise);
Future(const T& _t);
Future(const Future<T>& that);
- Future<T>& operator = (const Future<T>& that);
virtual ~Future();
+ Future<T>& operator = (const Future<T>& that);
bool ready() const;
bool await(double secs = 0) const;
T get() const;
@@ -84,6 +84,21 @@ Future<T>::Future(const Future<T>& that)
template <typename T>
+Future<T>::~Future()
+{
+ assert(refs != NULL);
+ if (__sync_sub_and_fetch(refs, 1) == 0) {
+ delete refs;
+ assert(t != NULL);
+ if (*t != NULL)
+ delete *t;
+ assert(latch != NULL);
+ delete latch;
+ }
+}
+
+
+template <typename T>
Future<T>& Future<T>::operator = (const Future<T>& that)
{
if (this != &that) {
@@ -109,21 +124,6 @@ Future<T>& Future<T>::operator = (const
template <typename T>
-Future<T>::~Future()
-{
- assert(refs != NULL);
- if (__sync_sub_and_fetch(refs, 1) == 0) {
- delete refs;
- assert(t != NULL);
- if (*t != NULL)
- delete *t;
- assert(latch != NULL);
- delete latch;
- }
-}
-
-
-template <typename T>
bool Future<T>::ready() const
{
assert(t != NULL);