summaryrefslogtreecommitdiff
path: root/src/lib/butler.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-17 01:25:02 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-22 13:29:58 +0100
commit9dd72fc481349f0b5ce985164441eecfa6485c19 (patch)
treed8136ef6d6b660a5a411722a128d0e309333ff3d /src/lib/butler.cc
parent169c47ede14b6e86e054871a56ffa048357b4463 (diff)
Add abstraction of io_{context,service} and use it as appropriate.
Diffstat (limited to 'src/lib/butler.cc')
-rw-r--r--src/lib/butler.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/butler.cc b/src/lib/butler.cc
index dd9874587..d4d5ae0a2 100644
--- a/src/lib/butler.cc
+++ b/src/lib/butler.cc
@@ -74,7 +74,7 @@ Butler::Butler (
)
: _film (film)
, _player (player)
- , _prepare_work (new boost::asio::io_service::work(_prepare_service))
+ , _prepare_work(dcpomatic::make_work_guard(_prepare_context))
, _pending_seek_accurate (false)
, _suspended (0)
, _finished (false)
@@ -108,7 +108,7 @@ Butler::Butler (
LOG_TIMING("start-prepare-threads %1", boost::thread::hardware_concurrency() * 2);
for (size_t i = 0; i < boost::thread::hardware_concurrency() * 2; ++i) {
- _prepare_pool.create_thread (bind (&boost::asio::io_service::run, &_prepare_service));
+ _prepare_pool.create_thread(bind(&dcpomatic::io_context::run, &_prepare_context));
}
}
@@ -124,7 +124,7 @@ Butler::~Butler ()
_prepare_work.reset ();
_prepare_pool.join_all ();
- _prepare_service.stop ();
+ _prepare_context.stop();
_thread.interrupt ();
try {
@@ -355,7 +355,7 @@ Butler::video (shared_ptr<PlayerVideo> video, DCPTime time)
return;
}
- _prepare_service.post (bind(&Butler::prepare, this, weak_ptr<PlayerVideo>(video)));
+ dcpomatic::post(_prepare_context, bind(&Butler::prepare, this, weak_ptr<PlayerVideo>(video)));
_video.put (video, time);
}