|
Boost Users : |
Subject: [Boost-users] [Fwd: io_service::strand - order of execution guarantees]
From: Chris Hite (C.Hite_at_[hidden])
Date: 2009-04-27 11:13:32
Can someone give me a guarantee about the order in which operations
dispatched./posted to a strand are executed?
Obviously if two different threads call post() or dispatch(), there is a
race condition. However if one thread calls dispatch() twice, can it be
sure that the first handler executes before the second?
What happens if post() and dispatch() are mixed? Looking at the library
it appears that a posted handler causes any subsequent dispatches to act
exactly as posts. It appears as though a strong guarantee is being made:
All handlers posted or dispatched will execute in order.
If such a useful guarantee is required internally by asio, it should be
made public and be documented.
Christopher Hite
RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am Main
T: +49.69.61009.0 / F: +49.69.61009.181
Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Geschäftsführer: Steffen Gemuenden, Igor Sluga
www.rtsgroup.net
This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please notify me immediately by return email and promptly delete this message and its attachments from your computer system.
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