Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture Ctrl+C in cli_wallet when not in daemon mode #1193 #77

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/fc/rpc/cli.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
7 changes: 7 additions & 0 deletions include/fc/thread/future.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -298,6 +303,8 @@ namespace fc {
}
}

fc::thread* blocked_thread() { return m_prom->blocked_thread(); }

/// @pre valid()
bool ready()const { return m_prom->ready(); }

Expand Down