Fix copyright lines
[folly.git] / folly / futures / SharedPromise.h
index d3b363efb4c5efd8a444f6bcf3c3773e27a4e5ac..c8c77ccdfaa294c2fc5404e4b8e5edf8526ab4c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2014-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
 #pragma once
 
 #include <folly/Portability.h>
+#include <folly/executors/InlineExecutor.h>
 #include <folly/futures/Promise.h>
 
 namespace folly {
@@ -50,6 +51,15 @@ class SharedPromise {
    * Return a Future tied to the shared core state. Unlike Promise::getFuture,
    * this can be called an unlimited number of times per SharedPromise.
    */
+  SemiFuture<T> getSemiFuture();
+
+  /**
+   * Return a Future tied to the shared core state. Unlike Promise::getFuture,
+   * this can be called an unlimited number of times per SharedPromise.
+   * NOTE: This function is deprecated. Please use getSemiFuture and pass the
+   *       appropriate executor to .via on the returned SemiFuture to get a
+   *       valid Future where necessary.
+   */
   Future<T> getFuture();
 
   /** Return the number of Futures associated with this SharedPromise */