1 from libcpp cimport bool as cbool
3 cdef extern from "folly/ExceptionWrapper.h" namespace "folly":
4 cdef cppclass cFollyExceptionWrapper "folly::exception_wrapper":
5 void throwException() except +
7 cdef extern from "folly/Try.h" namespace "folly" nogil:
8 cdef cppclass cFollyTry "folly::Try"[T]:
10 cbool hasException[T]()
12 cFollyExceptionWrapper exception()
14 cdef extern from "folly/futures/Future.h" namespace "folly" nogil:
15 cdef cppclass cFollyFuture "folly::Future"[T]:
17 #TODO add via and then
19 cdef extern from "folly/Unit.h" namespace "folly":
20 struct cFollyUnit "folly::Unit":
23 cFollyUnit c_unit "folly::unit"
25 cdef extern from "folly/futures/Promise.h" namespace "folly":
26 cdef cppclass cFollyPromise "folly::Promise"[T]:
27 void setValue[M](M& value)
28 void setException[E](E& value)
30 cdef extern from "folly/Executor.h" namespace "folly":
31 cdef cppclass cFollyExecutor "folly::Executor":