cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Passing data between threads.
Passing data between threads.
Nov 6, 2013 at 10:17pm UTC
rafae11
(264)
I have a main thread and a worker thread.
How do i pass data between them when both are already running
without using global variables?
Nov 6, 2013 at 11:13pm UTC
Cubbi
(4774)
publish and notify, push on a thread-safe queue, there are plenty of means to communicate. Details depend on what framework are you using (pthreads, std::thread, TBB, boost.asio), what you're familiar with, expected usage patterns, etc.
Topic archived. No new replies allowed.