|
Boost Users : |
Subject: [Boost-users] Simple threading question (I hope)
From: Alec Munro (amunro_at_[hidden])
Date: 2008-11-06 13:04:32
Hi List,
I'm fairly new to multithreading, especially in C++. Things seem
generally straightforward when using boost::thread, but there was one
question I had.
I have a mutex that I use to control access to a data processing object.
Whenever I receive new data, I attempt to lock the mutex, and process
it. However, I think it's possible that I might receive several data
packets while I'm processing, and it's important that these packets are
processed in order. So I suppose my question is, when a mutex is
unlocked, how is it determined which thread gets to lock it next?
Thanks,
Alec Munro
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
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