File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
include/bitcoin/node/chasers Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -163,9 +163,6 @@ class BCN_API chaser
163163#define SUBSCRIBE_EVENTS (method, ...) \
164164 subscribe_events (BIND(method, __VA_ARGS__))
165165
166- #define PARALLEL (method, ...) \
167- boost::asio::post (threadpool_.service(), BIND(method, __VA_ARGS__));
168-
169166} // namespace node
170167} // namespace libbitcoin
171168
Original file line number Diff line number Diff line change @@ -42,6 +42,14 @@ class BCN_API chaser_validate
4242 void stop () NOEXCEPT override ;
4343
4444protected:
45+ // / Post a method in base or derived class in parallel (use PARALLEL).
46+ template <class Derived , typename Method, typename ... Args>
47+ inline auto parallel (Method&& method, Args&&... args) NOEXCEPT
48+ {
49+ return boost::asio::post (threadpool_.service (),
50+ BIND_THIS (method, args));
51+ }
52+
4553 typedef network::race_unity<const code&, const database::tx_link&> race;
4654
4755 virtual bool handle_event (const code& ec, chase event_,
You can’t perform that action at this time.
0 commit comments