Client RequestChannels and folly/python/futures.h
authorJason Fried <fried@fb.com>
Mon, 10 Apr 2017 18:05:00 +0000 (11:05 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 10 Apr 2017 18:05:44 +0000 (11:05 -0700)
Summary:
Use RequestChannel to construct Thrift Clients.

use folly/python/futures.h to marry up thrift client rpc futures to
asyncio futures. No gil exchanges

py3 clients are async context managers now.

Reviewed By: ambv, yfeldblum

Differential Revision: D4639677

fbshipit-source-id: 6b400747507446882d3cfcb1cf7e85c3daa07a2e

folly/python/__init__.pxd

index b5deda2..b45054c 100644 (file)
@@ -6,7 +6,7 @@ cdef extern from "folly/ExceptionWrapper.h" namespace "folly":
 
 cdef extern from "folly/Try.h" namespace "folly" nogil:
     cdef cppclass cFollyTry "folly::Try"[T]:
-        T value() except+
+        T value()
         cbool hasException[T]()
         cbool hasException()
         cFollyExceptionWrapper exception()