File tree Expand file tree Collapse file tree 4 files changed +8
-23
lines changed
Expand file tree Collapse file tree 4 files changed +8
-23
lines changed Original file line number Diff line number Diff line change 88#include " boost/asio/io_context.hpp"
99#include " boost/asio/signal_set.hpp"
1010#include " boost/asio/this_coro.hpp"
11+ #include " boost/asio/thread_pool.hpp"
1112
1213namespace aos {
1314namespace impl {
Original file line number Diff line number Diff line change 11#pragma once
22#include < atomic>
3- #include < future>
43#include < csignal>
4+ #include < future>
55
66#include " aos/exit_waiter/i_exit_waiter.h"
7+ #include " aos/logger/mylog.h"
78#include " boost/asio/io_context.hpp"
89#include " boost/asio/signal_set.hpp"
10+ #include " boost/asio/steady_timer.hpp"
911#include " boost/asio/this_coro.hpp"
10- #include " aos/logger/my_logger.h "
12+ #include " boost/asio/thread_pool.hpp "
1113
1214namespace aos {
1315namespace impl {
1416class UserExitOnTimeoutWaiter : public IExitWaiterInterface {
15- public:
17+ public:
1618 UserExitOnTimeoutWaiter (boost::asio::thread_pool& pool,
1719 std::chrono::steady_clock::duration timeout)
1820 : timer_(pool.get_executor(), timeout) {}
@@ -33,7 +35,7 @@ class UserExitOnTimeoutWaiter : public IExitWaiterInterface {
3335 future.wait (); // блокируемся здесь
3436 }
3537
36- private:
38+ private:
3739 boost::asio::steady_timer timer_;
3840};
3941
Original file line number Diff line number Diff line change 22| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
33| [ example47] ( ./example43/main.cpp ) | subscribe to three Binance trading pairs that form a triangular arbitrage loop |
44| [ example46] ( ./example43/main.cpp ) | configure triangular arbitrage loop |
5- | [ example45] ( ./example43/main.cpp ) | Prototype to extract the current funding rate for a ticker on Binance |
5+ | [ example45] ( ./example43/main.cpp ) | prototype to extract the current funding rate for a ticker on Binance |
66| [ example44] ( ./example43/main.cpp ) | improve deviation_and_mutual_information strategy |
77| [ example43] ( ./example43/main.cpp ) | bybit mainnet spot infrastructure |
88| [ example42] ( ./example42/main.cpp ) | bybit mainnet linear infrastructure |
Original file line number Diff line number Diff line change @@ -129,24 +129,6 @@ class StrategyWrapper {
129129};
130130}; // namespace str
131131
132- // class UserExitWaiter {
133- // public:
134- // explicit UserExitWaiter(boost::asio::thread_pool& pool)
135- // : exit_future_(exit_promise_.get_future()) {
136- // boost::asio::post(pool, [this] {
137- // std::cout << "Press ENTER to exit...\n";
138- // std::cin.get();
139- // exit_promise_.set_value();
140- // });
141- // }
142-
143- // void Wait() { exit_future_.wait(); }
144-
145- // private:
146- // std::promise<void> exit_promise_;
147- // std::future<void> exit_future_;
148- // };
149-
150132int main (int , char **) {
151133 {
152134 try {
You can’t perform that action at this time.
0 commit comments