mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-14 09:36:41 +02:00
Use strand executors
This commit is contained in:
parent
e6872593ee
commit
12aeb5859c
15 changed files with 38 additions and 38 deletions
|
@ -113,12 +113,12 @@ void ProcessStream::do_connect()
|
|||
fcntl(pipe_stdout_.native_source(), F_SETFL, flags | O_NONBLOCK);
|
||||
|
||||
process_ = bp::child(path_ + exe_ + " " + params_, bp::std_out > pipe_stdout_, bp::std_err > pipe_stderr_, bp::start_dir = path_);
|
||||
stream_ = make_unique<stream_descriptor>(ioc_, pipe_stdout_.native_source());
|
||||
stream_stderr_ = make_unique<stream_descriptor>(ioc_, pipe_stderr_.native_source());
|
||||
stream_ = make_unique<stream_descriptor>(strand_, pipe_stdout_.native_source());
|
||||
stream_stderr_ = make_unique<stream_descriptor>(strand_, pipe_stderr_.native_source());
|
||||
on_connect();
|
||||
if (wd_timeout_sec_ > 0)
|
||||
{
|
||||
watchdog_ = make_unique<Watchdog>(ioc_, this);
|
||||
watchdog_ = make_unique<Watchdog>(strand_, this);
|
||||
watchdog_->start(std::chrono::seconds(wd_timeout_sec_));
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue