Boost logo

Boost Users :

Subject: Re: [Boost-users] Why does boost thread copy a functor?
From: Niklas Angare (li51ckf02_at_[hidden])
Date: 2012-01-19 18:08:25


"Chris Cleeland" wrote:
> While I understand the rationale now (thanks to your excellent
> explanation), I will also point out that I am not alone in my
> misunderstanding of the interface. I discussed the issue with a few
> colleagues and asked what they would expect to happen, and they all
> had similar expectations to mine (that the functor was not copied).
> The commonality of misunderstanding is what prompted my suggestion
> that the copying of the argument be more explicit.

The documentation is crystal clear, though:
"Effects: func is copied into storage managed internally by the thread
library"

(http://www.boost.org/doc/libs/1_48_0/doc/html/thread/thread_management.html#thread.thread_management.thread.callable_constructor)
 


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