projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make SemiFuture::via throw on nullptr executor.
[folly.git]
/
folly
/
futures
/
Future-inl.h
diff --git
a/folly/futures/Future-inl.h
b/folly/futures/Future-inl.h
index 20cf87bc647a449fe462ca9b67195e3d1eecb39d..dea9e863095638bf62e82ca77b02734c5c0fa8ca 100644
(file)
--- a/
folly/futures/Future-inl.h
+++ b/
folly/futures/Future-inl.h
@@
-483,6
+483,9
@@
void SemiFuture<T>::boost_() {
template <class T>
inline Future<T> SemiFuture<T>::via(Executor* executor, int8_t priority) && {
throwIfInvalid();
template <class T>
inline Future<T> SemiFuture<T>::via(Executor* executor, int8_t priority) && {
throwIfInvalid();
+ if (!executor) {
+ throwNoExecutor();
+ }
// If current executor is deferred, boost block to ensure that work
// progresses and is run on the new executor.
// If current executor is deferred, boost block to ensure that work
// progresses and is run on the new executor.