mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-10-04 12:50:54 +02:00
async_run
Reviewers: ivica Reviewed By: ivica Subscribers: korina Differential Revision: https://repo.mireo.local/D27342
This commit is contained in:
@@ -96,7 +96,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
c.credentials("test-client", "", "")
|
||||
.brokers("mqtt.broker", 1883)
|
||||
.run();
|
||||
.async_run(asio::detached);
|
||||
|
||||
for (int i = 0; i < thread_num - 1; ++i)
|
||||
threads.emplace_back([&ioc] { ioc.run(); });
|
||||
@@ -108,4 +108,3 @@ int main(int argc, char** argv) {
|
||||
for (auto& t : threads)
|
||||
if (t.joinable()) t.join();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user