mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated pow-miner + small bugfix
This commit is contained in:
parent
f064b1047a
commit
dab7ee3f97
16 changed files with 344 additions and 25 deletions
|
@ -113,9 +113,11 @@ void TerminalIOImpl::start_up() {
|
|||
}
|
||||
#endif
|
||||
|
||||
td::actor::SchedulerContext::get()->get_poll().subscribe(stdin_.get_poll_info().extract_pollable_fd(this),
|
||||
td::PollFlags::Read());
|
||||
loop();
|
||||
if (!no_input_) {
|
||||
td::actor::SchedulerContext::get()->get_poll().subscribe(stdin_.get_poll_info().extract_pollable_fd(this),
|
||||
td::PollFlags::Read());
|
||||
loop();
|
||||
}
|
||||
}
|
||||
|
||||
void TerminalIOImpl::tear_down() {
|
||||
|
@ -329,10 +331,10 @@ TerminalIOOutputter::~TerminalIOOutputter() {
|
|||
}
|
||||
}
|
||||
|
||||
td::actor::ActorOwn<TerminalIO> TerminalIO::create(std::string prompt, bool use_readline,
|
||||
td::actor::ActorOwn<TerminalIO> TerminalIO::create(std::string prompt, bool use_readline, bool no_input,
|
||||
std::unique_ptr<Callback> callback) {
|
||||
return actor::create_actor<TerminalIOImpl>(actor::ActorOptions().with_name("terminal io").with_poll(), prompt,
|
||||
use_readline, std::move(callback));
|
||||
use_readline, no_input, std::move(callback));
|
||||
}
|
||||
|
||||
TerminalIOImpl *TerminalIOImpl::instance_ = nullptr;
|
||||
|
|
|
@ -93,7 +93,7 @@ class TerminalIO : public actor::Actor {
|
|||
virtual void set_log_interface() = 0;
|
||||
virtual bool readline_used() const = 0;
|
||||
|
||||
static td::actor::ActorOwn<TerminalIO> create(std::string prompt, bool use_readline,
|
||||
static td::actor::ActorOwn<TerminalIO> create(std::string prompt, bool use_readline, bool no_input,
|
||||
std::unique_ptr<Callback> callback);
|
||||
};
|
||||
|
||||
|
|
|
@ -66,8 +66,8 @@ class TerminalIOImpl : public TerminalIO, td::ObserverBase {
|
|||
void on_net() {
|
||||
loop();
|
||||
}
|
||||
TerminalIOImpl(std::string prompt, bool use_readline, std::unique_ptr<Callback> callback)
|
||||
: prompt_(prompt), use_readline_(use_readline), callback_(std::move(callback)) {
|
||||
TerminalIOImpl(std::string prompt, bool use_readline, bool no_input, std::unique_ptr<Callback> callback)
|
||||
: prompt_(prompt), use_readline_(use_readline), no_input_(no_input), callback_(std::move(callback)) {
|
||||
}
|
||||
|
||||
int stdin_getc();
|
||||
|
@ -83,6 +83,7 @@ class TerminalIOImpl : public TerminalIO, td::ObserverBase {
|
|||
|
||||
std::string prompt_;
|
||||
bool use_readline_ = false;
|
||||
bool no_input_ = false;
|
||||
std::unique_ptr<Callback> callback_;
|
||||
std::mutex out_mutex_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue