|
Boost : |
From: William Kempf (williamkempf_at_[hidden])
Date: 2001-08-21 08:53:19
>William Kempf wrote:
>>The only other solution is to allow threads to be created in a "suspended"
>>state and to "resume" them only when you've set the state,
>
> Why is that the 'only other soution'?
>What about:
>
> smart_ptr<thread> p = create_thread<smart_ptr>(THREAD_FUNC);
>
>where:
>
> thread_func::operator()(smart_ptr<thread>)
>
>is passed the same 'p' value that create_thread returns?
OK, there's ways around this issue by changing the interface, yes. I
strictly meant with out changing the interface. To do this with out a
monitor requires either a thread_ref interface which we've decided against,
or a two phase construction design, which is not really a good design
either. Since a thread_ref *CAN* be implemented with the current design I
see no issue here.
Bill Kempf
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk