|
Boost : |
From: Peter (piotrus_at_[hidden])
Date: 2002-06-18 18:46:43
I have a few more questions regarding boost::threads:
1) Is is at all possible to get a return value from a function which was
passed into a thread - for example after calling thread.join() ??
2) Assuming that I create a thread from within another thread ( for exaple:
from within the "main" thread - main()); is there a mechanism for that
newly created thread to notify my "main" thread that it has finished
execution?? Is there some sort of library (I am looking for something
platform independent) which would allow me to do that??
3) I would lie to run two threads in a client application. One would be
responsible for receiving and the other for sending data. The threads would
basically run in infinite loops. Both sending and receiving would be done
to/from the SAME socket. My question is: Do i still have to lock the mutex
during each opperation?? I have been doing a LOT of testing WITHOUT locking
it and have not had my program crash (yet). Is that because the kernel
(running win2000 and using the winsock API) is somehow dealing with all the
overhead of locking/unlocking the socket, or have I just been lucky??
Thanks in advance for any suggestions.
Best to you all
Peter
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk