/*
- * 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.
#pragma once
#include <folly/Portability.h>
+#include <folly/executors/InlineExecutor.h>
#include <folly/futures/Promise.h>
namespace folly {
* 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 */