You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Update asio to 1.34 and fixed build issues (#31)
* Update asio to 1.34
* Replace .wrap with bind_executor
* Rename io_service to io_context
* Use asio::post
* CI: Updated Visual Studio Toolset to v141 / VS2017
std::shared_ptr<asio::io_service> io_service_; /// global io service
46
+
std::shared_ptr<asio::io_context> io_context_; /// global io service
47
47
48
48
std::vector<std::thread> thread_pool_; /// Asio threadpool executing the io servic
49
-
std::shared_ptr<asio::io_service::work> dummy_work_; /// Dummy work, so the io_service will never run out of work and shut down, even if there is no publisher or subscriber at the moment
std::shared_ptr<work_guard_t> dummy_work_; /// Dummy work, so the io_context will never run out of work and shut down, even if there is no publisher or subscriber at the moment
Copy file name to clipboardExpand all lines: tcp_pubsub/src/publisher_impl.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ namespace tcp_pubsub
83
83
std::atomic<bool> is_running_; /// Indicates whether this publisher is running and can send data. May be false, if e.g. binding to the given address has failed.
84
84
85
85
// Asio
86
-
const std::shared_ptr<Executor> executor_; /// Global Executor (holding the io_service and thread pool)
86
+
const std::shared_ptr<Executor> executor_; /// Global Executor (holding the io_context and thread pool)
87
87
asio::ip::tcp::acceptor acceptor_; /// Acceptor used for waiting for clients (i.e. subscribers)
// - We can protect the variable with the data_strand => If the callback is currently running, the new callback will be applied afterwards
496
494
// - We don't need an additional mutex, so a synchronous callback should actually be able to set another callback that gets activated once the current callback call ends
497
495
// - Reading the next message will start once the callback call is finished. Therefore, read and callback are synchronized and the callback calls don't start stacking up
0 commit comments