diff --git a/include/fc/rpc/cli.hpp b/include/fc/rpc/cli.hpp index 6670a1459..245e62af0 100644 --- a/include/fc/rpc/cli.hpp +++ b/include/fc/rpc/cli.hpp @@ -32,6 +32,8 @@ namespace fc { namespace rpc { void set_prompt( const string& prompt ); + void quit_blocked_thread(){ _run_complete.blocked_thread()->quit(); } + private: void run(); diff --git a/include/fc/thread/future.hpp b/include/fc/thread/future.hpp index cc2c317ef..d82c1e557 100644 --- a/include/fc/thread/future.hpp +++ b/include/fc/thread/future.hpp @@ -72,6 +72,11 @@ namespace fc { void set_exception( const fc::exception_ptr& e ); + fc::thread* blocked_thread() + { + return _blocked_thread; + } + protected: void _wait( const microseconds& timeout_us ); void _wait_until( const time_point& timeout_us ); @@ -298,6 +303,8 @@ namespace fc { } } + fc::thread* blocked_thread() { return m_prom->blocked_thread(); } + /// @pre valid() bool ready()const { return m_prom->ready(); }