Originally Posted by Boost DocumentationOriginally Posted by ISO/IEC 14882:2011Broken. But fixed in post #29.Originally Posted by POSIX.1-2008
gg
Originally Posted by Boost DocumentationOriginally Posted by ISO/IEC 14882:2011Broken. But fixed in post #29.Originally Posted by POSIX.1-2008
gg
ok , after some more readings and messing with classes and testing stuff in different ways and scenarios im glad to say that all my former answers to my former questions are wrong , and there are nearly easy ways to do most of the tasks and achieve what boost is seemed to not supporting it
with my current level of knowledge on boost i revise myself :
how can i get all threads ID issued by me in my app?
its fairly easy , one approach can be , when issuing any threads, save their id in a vector , or save the threads in a vector, or even use an array of threads and manage them through that ( using joinable() one can say if a thread object points to a valid thread of execution or not, using this_thread__get_id() , one can get the current running thread id , and compare it if the needs be)
how can i iterate through running threads in my app ? :
again if one use a vector , or an array of threads object , one can easily use a for to iterate through these objects
is there any kind of means to get all the running threads using boost library?(if it does whats the calss? if it doesnt how can i do that?)
in this special case , boost doesnt provide any means to get all running threads in a system . host os api should be used.
can i resume a thread after pausing it ? ( how can i pause a thread rather than using sleep? ) : using intrusion one can simulate this pausing /resuming feature , one can also use conditional variable for this purpose
how to terminate a thread in boost ?:
fairly easy again , one can use interrupts , or simply return when the threads needs to be terminated
how can one check the status of a thread of execution to see e.g it was successful or not :
one can use futures in boost::threading , and by using that query the return value of that thread
i think these were my worst concerns when using boost . please correct me if there is sth wrong
Last edited by Masterx; 04-17-2012 at 04:51 AM.
Highlight Your Codes
The Boost C++ Libraries (online Reference)
Bill Bryson"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."