Commit 7e209f43 authored by Lee Howes's avatar Lee Howes Committed by Facebook Github Bot

Remove delayedUnsafe entirely

Summary:
delayedUnsafe was deprecated.

All callers have been removed. This removes the core code so that it will not sneak back in.

Reviewed By: yfeldblum

Differential Revision: D14029673

fbshipit-source-id: 0384364a8e0ab8953e9746b91e3b6e7b2e5d7c67
parent 44e37ec5
......@@ -2003,11 +2003,6 @@ Future<T> Future<T>::delayed(Duration dur, Timekeeper* tk) && {
});
}
template <class T>
Future<T> Future<T>::delayedUnsafe(Duration dur, Timekeeper* tk) {
return std::move(*this).semi().delayed(dur, tk).toUnsafeFuture();
}
namespace futures {
namespace detail {
......
......@@ -1615,17 +1615,6 @@ class Future : private futures::detail::FutureBase<T> {
/// - `RESULT.valid() == true`
Future<T> delayed(Duration, Timekeeper* = nullptr) &&;
/// Delay the completion of this Future for at least this duration from
/// now. The optional Timekeeper is as with futures::sleep().
/// WARNING: Returned future may complete on Timekeeper thread.
// clang-format off
[[deprecated(
"Continuation may compelete on Timekeeper thread. "
"Please use delayed instead.")]]
Future<T>
delayedUnsafe(Duration, Timekeeper* = nullptr);
// clang-format on
/// Blocks until the future is fulfilled. Returns the value (moved-out), or
/// throws the exception. The future must not already have a continuation.
///
......
......@@ -134,16 +134,6 @@ TEST(Timekeeper, semiFutureDelayed) {
EXPECT_GE(dur, one_ms);
}
TEST(Timekeeper, futureDelayedUnsafe) {
auto t1 = now();
auto dur = makeFuture()
.delayedUnsafe(one_ms)
.thenValue([=](auto&&) { return now() - t1; })
.get();
EXPECT_GE(dur, one_ms);
}
TEST(Timekeeper, futureDelayedStickyExecutor) {
// Check that delayed without an executor binds the inline executor.
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment