zeromq / cppzmq

Header-only C++ binding for libzmq
http://www.zeromq.org
MIT License
1.93k stars 757 forks source link

examples: fix missing header #568

Closed stephanlachnit closed 2 years ago

stephanlachnit commented 2 years ago

With GCC12, I get this error:

../subprojects/cppzmq-4.8.1/examples/pubsub_multithread_inproc.cpp: In function ‘void PublisherThread(zmq::context_t*)’:
../subprojects/cppzmq-4.8.1/examples/pubsub_multithread_inproc.cpp:14:23: error: ‘sleep_for’ is not a member of ‘std::this_thread’
   14 |     std::this_thread::sleep_for(std::chrono::milliseconds(20));

This is because sleep_for is part of thread, which is not included in the example. This PR fixes that.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 2846473152


Totals Coverage Status
Change from base Build 2504979042: 0.0%
Covered Lines: 801
Relevant Lines: 931

💛 - Coveralls