Boost logo

Boost Users :

Subject: Re: [Boost-users] threads: shared lock question
From: jiryih.tsaur_at_[hidden]
Date: 2011-09-16 18:20:41


Threads share the process memory. Inter-thread communication via memory is the fastest.

Synchronization may be required for memory access amongst producers and consumers. However, implementations exist that require no lock to avoid context switch for systems with critical demand on performancem
  

----- Original Message -----
From: Mark Higgins [mailto:miggins_at_[hidden]]
Sent: Friday, September 16, 2011 12:50 AM
To: boost-users_at_[hidden] <boost-users_at_[hidden]>
Subject: [Boost-users] threads: shared lock question

I'm new to threads and boost, so I'm sure this is a real newbie question and hopefully quite easy to answer!

I'm trying to set up a pool of threads that do a calculation, and I want to wait for those calculations to finish. Normally I'd do thread_group.join_all() to wait for the threads to exit - but in this case I want my threads hanging around so that I can redo that calculation over and over again when I ask it to do.

What's the best way to signal back to the main thread that all calculations are complete? Should I use a barrier?

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users

PLEASE READ: This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please delete it and all copies from your system, destroy any hard copies and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Nomura Holding America Inc., Nomura Securities International, Inc, and their respective subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state the views of such entity. Unless otherwise stated, any pricing information in this message is indicative only, is subject to change and does not constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as preliminary only and subject to our formal written confirmation.


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