<commit_before>from libcpp cimport bool as cbool

cdef extern from "folly/ExceptionWrapper.h" namespace "folly":
    cdef cppclass cFollyExceptionWrapper "folly::exception_wrapper":
        void throw_exception() except +

cdef extern from "folly/Try.h" namespace "folly" nogil:
    cdef cppclass cFollyTry "folly::Try"[T]:
        T value()
        cbool hasException[T]()
        cbool hasException()
        cFollyExceptionWrapper exception()

cdef extern from "folly/futures/Future.h" namespace "folly" nogil:
    cdef cppclass cFollyFuture "folly::Future"[T]:
        T get()
        cbool hasValue()
        cbool isReady()
        #TODO add via and then

    cdef cppclass cFollySemiFuture "folly::SemiFuture"[T]:
        T get()
        pass

cdef extern from "folly/Unit.h" namespace "folly":
    struct cFollyUnit "folly::Unit":
        pass

    cFollyUnit c_unit "folly::unit"

cdef extern from "folly/futures/Promise.h" namespace "folly":
    cdef cppclass cFollyPromise "folly::Promise"[T]:
        cFollyPromise()
        void setValue[M](M& value)
        void setException[E](E& value)
        cFollyFuture[T] getFuture()

cdef extern from "folly/Executor.h" namespace "folly":
    cdef cppclass cFollyExecutor "folly::Executor":
        pass<commit_msg>Add move ctor and makeEmpty method declarations to cFollyPromise<commit_after>from libcpp cimport bool as cbool

cdef extern from "folly/ExceptionWrapper.h" namespace "folly":
    cdef cppclass cFollyExceptionWrapper "folly::exception_wrapper":
        void throw_exception() except +

cdef extern from "folly/Try.h" namespace "folly" nogil:
    cdef cppclass cFollyTry "folly::Try"[T]:
        T value()
        cbool hasException[T]()
        cbool hasException()
        cFollyExceptionWrapper exception()

cdef extern from "folly/futures/Future.h" namespace "folly" nogil:
    cdef cppclass cFollyFuture "folly::Future"[T]:
        T get()
        cbool hasValue()
        cbool isReady()
        #TODO add via and then

    cdef cppclass cFollySemiFuture "folly::SemiFuture"[T]:
        T get()
        pass

cdef extern from "folly/Unit.h" namespace "folly":
    struct cFollyUnit "folly::Unit":
        pass

    cFollyUnit c_unit "folly::unit"

cdef extern from "folly/futures/Promise.h" namespace "folly":
    cdef cppclass cFollyPromise "folly::Promise"[T]:
        cFollyPromise()
        cFollyPromise(cFollyPromise&&)
        void setValue[M](M& value)
        void setException[E](E& value)
        cFollyFuture[T] getFuture()

        @staticmethod
        cFollyPromise[T] makeEmpty()

cdef extern from "folly/Executor.h" namespace "folly":
    cdef cppclass cFollyExecutor "folly::Executor":
        pass
{'fraction_non_alphanumeric': 0.10141158989598811, 'fraction_numerical': 0.0, 'mean_word_length': 3.2210031347962382, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4088587', 'n_tokens_mistral': 890, 'n_tokens_neox': 875, 'n_words': 231}