Commit 77e5e1b5 authored by Kirk Shoop's avatar Kirk Shoop Committed by Facebook Github Bot

change abort to terminate

Summary: search replace abort with terminate to fix build errors

Reviewed By: yfeldblum

Differential Revision: D13106734

fbshipit-source-id: 146367a7fdbed9c945cb32cfdcb5ac521a1c861b
parent f3260585
......@@ -48,7 +48,7 @@ struct countdown {
void value(ExecutorRef exec);
template <class E>
void error(E e) {
std::abort();
std::terminate();
}
void done() {}
PUSHMI_TEMPLATE(class Up)
......
......@@ -78,7 +78,7 @@ struct ignoreVF {
struct abortEF {
[[noreturn]]
void operator()(detail::any) noexcept {
std::abort();
std::terminate();
}
};
......@@ -115,6 +115,7 @@ struct priorityZeroF {
struct passDVF {
PUSHMI_TEMPLATE(class Data, class... VN)
// (requires True<>) //
(requires requires (
set_value(std::declval<Data&>(), std::declval<VN>()...)
) && Receiver<Data>)
......
......@@ -27,7 +27,7 @@ struct no_fail_fn {
private:
struct on_error_impl {
[[noreturn]] void operator()(any, any) noexcept {
std::abort();
std::terminate();
}
};
template <class In>
......
......@@ -124,25 +124,25 @@ public:
return *this;
}
void value(VN... vn) {
if (!started_) {std::abort();}
if (!started_) {std::terminate();}
if (done_){ return; }
vptr_->value_(data_, std::move(vn)...);
}
void error(E e) noexcept {
if (!started_) {std::abort();}
if (!started_) {std::terminate();}
if (done_){ return; }
done_ = true;
vptr_->error_(data_, std::move(e));
}
void done() {
if (!started_) {std::abort();}
if (!started_) {std::terminate();}
if (done_){ return; }
done_ = true;
vptr_->done_(data_);
}
void starting(any_receiver<PE, PV> up) {
if (started_) {std::abort();}
if (started_) {std::terminate();}
started_ = true;
vptr_->starting_(data_, std::move(up));
}
......@@ -196,7 +196,7 @@ class flow_receiver<VF, EF, DF, StrtF> {
PUSHMI_TEMPLATE (class V)
(requires Invocable<VF&, V>)
void value(V&& v) {
if (!started_) {std::abort();}
if (!started_) {std::terminate();}
if (done_){ return; }
nf_((V&&) v);
}
......@@ -204,13 +204,13 @@ class flow_receiver<VF, EF, DF, StrtF> {
(requires Invocable<EF&, E>)
void error(E e) noexcept {
static_assert(NothrowInvocable<EF&, E>, "error function must be noexcept");
if (!started_) {std::abort();}
if (!started_) {std::terminate();}
if (done_){ return; }
done_ = true;
ef_(std::move(e));
}
void done() {
if (!started_) {std::abort();}
if (!started_) {std::terminate();}
if (done_){ return; }
done_ = true;
df_();
......@@ -218,7 +218,7 @@ class flow_receiver<VF, EF, DF, StrtF> {
PUSHMI_TEMPLATE(class Up)
(requires Invocable<StrtF&, Up&&>)
void starting(Up&& up) {
if (started_) {std::abort();}
if (started_) {std::terminate();}
started_ = true;
strtf_( (Up &&) up);
}
......@@ -276,7 +276,7 @@ class flow_receiver<Data, DVF, DEF, DDF, DStrtF> {
PUSHMI_TEMPLATE (class V)
(requires Invocable<DVF&, Data&, V>)
void value(V&& v) {
if (!started_) {std::abort();}
if (!started_) {std::terminate();}
if (done_){ return; }
nf_(data_, (V&&) v);
}
......@@ -285,13 +285,13 @@ class flow_receiver<Data, DVF, DEF, DDF, DStrtF> {
void error(E&& e) noexcept {
static_assert(
NothrowInvocable<DEF&, Data&, E>, "error function must be noexcept");
if (!started_) {std::abort();}
if (!started_) {std::terminate();}
if (done_){ return; }
done_ = true;
ef_(data_, (E&&) e);
}
void done() {
if (!started_) {std::abort();}
if (!started_) {std::terminate();}
if (done_){ return; }
done_ = true;
df_(data_);
......@@ -299,7 +299,7 @@ class flow_receiver<Data, DVF, DEF, DDF, DStrtF> {
PUSHMI_TEMPLATE (class Up)
(requires Invocable<DStrtF&, Data&, Up&&>)
void starting(Up&& up) {
if (started_) {std::abort();}
if (started_) {std::terminate();}
started_ = true;
strtf_(data_, (Up &&) up);
}
......
......@@ -125,7 +125,7 @@ TEST(JustIntSingleSender, TransformAndSubmit) {
return v + 1;
},
[&](auto v) {
std::abort();
std::terminate();
return v;
}) |
op::transform([&](int v) {
......@@ -175,7 +175,7 @@ TEST(FromIntManySender, TransformAndSubmit) {
return v + 1;
},
[&](auto v) {
std::abort();
std::terminate();
return v;
}) |
op::transform([&](int v) {
......
......@@ -131,7 +131,7 @@ class time_source_queue : public time_source_queue_base<E, TP> {
if (s->t_.get_id() == std::this_thread::get_id()) {
// Executor is not allowed to use the time_source thread
std::abort();
std::terminate();
}
//
......@@ -144,7 +144,7 @@ class time_source_queue : public time_source_queue_base<E, TP> {
std::unique_lock<std::mutex> guard{s->lock_};
if (!this->dispatching_ || this->pending_) {
std::abort();
std::terminate();
}
if (this->heap_.empty()) {
......@@ -191,7 +191,7 @@ class time_source_queue : public time_source_queue_base<E, TP> {
std::unique_lock<std::mutex> guard{s->lock_};
if (!this->dispatching_ || this->pending_) {
std::abort();
std::terminate();
}
while (!this->heap_.empty()) {
......@@ -209,7 +209,7 @@ class time_source_queue : public time_source_queue_base<E, TP> {
std::unique_lock<std::mutex> guard{s->lock_};
if (!this->dispatching_ || this->pending_) {
std::abort();
std::terminate();
}
this->dispatching_ = false;
......@@ -307,7 +307,7 @@ class time_source_shared : public time_source_shared_base<E, TP> {
// not allowed to be discarded without joining and completing all queued
// items
if (t_.joinable() || this->items_ != 0) {
std::abort();
std::terminate();
}
}
time_source_shared() {}
......@@ -415,7 +415,7 @@ class time_source_shared : public time_source_shared_base<E, TP> {
// once join() is called, new work queued to the executor is not safe unless
// it is nested in an existing item.
if (!!this->joined_) {
std::abort();
std::terminate();
};
queue->heap_.push(std::move(item));
......
......@@ -130,7 +130,7 @@ class trampoline {
template <class Selector, class Derived>
static void submit(Selector, Derived&, recurse_t) {
if (!is_owned()) {
abort();
std::terminate();
}
repeat(*owner()) = true;
}
......@@ -185,19 +185,19 @@ class trampoline {
pending(pending_store).clear();
if (!is_owned()) {
std::abort();
std::terminate();
}
if (!pending(pending_store).empty()) {
std::abort();
std::terminate();
}
owner() = nullptr;
throw;
}
if (!is_owned()) {
std::abort();
std::terminate();
}
if (!pending(pending_store).empty()) {
std::abort();
std::terminate();
}
owner() = nullptr;
}
......@@ -247,7 +247,7 @@ class trampoline {
template <class E = std::exception_ptr>
detail::trampoline_id get_trampoline_id() {
if (!detail::trampoline<E>::is_owned()) {
std::abort();
std::terminate();
}
return detail::trampoline<E>::get_id();
}
......@@ -282,7 +282,7 @@ decltype(auto) repeat(delegator<E>& exec) {
}
template <class AnyExec>
[[noreturn]] void repeat(AnyExec&) {
std::abort();
std::terminate();
}
} // namespace detail
......
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