Safer Clients
Summary: Python is considered a Safe Enivronment, where things like aborts and segfaults can not happen. If clients where used outside of "async with" we use to print a error message and then C++ would abort. This fix makes sure C++ no longer aborts but we still print the message that the "async with" should be used. All futures are now shielded so cancel will not produce strange exceptions when C++ decides to fullfill the canceled future. Also we now pass a tuple of client and future to all bridgeFutureWith calls. This has the affect of making sure the client can not GC before the future is completed. We now use a unique_ptr for RequestChannel so there is no more race to delete the shared pointer. Reviewed By: yfeldblum Differential Revision: D7389380 fbshipit-source-id: 6a3ca019190907e726c550c9b379a2a2610d0b0a
Showing
Please register or sign in to comment