|
Boost Users : |
Subject: [Boost-users] Conditional thread join
From: Chris (cmrchs_at_[hidden])
Date: 2010-11-22 19:12:22
Hello.
I have following small program (pseudocode):
void Read()
{
do
{
// ...
} while (...);
} // Read()
void Write()
{
do
{
// ...
} while (...);
} // Write()
boost::thread thrd1(Read);
boost::thread thrd2(Write);
// I don't want the following
thrd1.join();
thrd2.join();
No, I want to stop when either thread finishes
something like a join_any(). Does that exist?
greetings
Chris
} while (...);
} // Write()
boost::thread thrd1(Read);
boost::thread thrd2(Write);
// I don't want the following
thrd1.join();
thrd2.join();
No, I want to stop when either thread finishes
something like a conditional join. Does that exist?
greetings
Chris
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net