[ace-users] suspended thread can automatically execute, but I don't call resume()

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Mon Jul 9 05:00:29 CDT 2007


Hi,

To ensure that we have proper version/platform/compiler information,
please make sure you fill out the appropriate problem report form
(PRF), which is in

$ACE_ROOT/PROBLEM-REPORT-FORM
$TAO_ROOT/PROBLEM-REPORT-FORM

or in

$ACE_ROOT/BUG-REPORT-FORM
$TAO_ROOT/BUG-REPORT-FORM

in older versions of ACE+TAO.  Make sure to include this information
when asking any questions about ACE+TAO since otherwise we have to
"guess" what version/platform/compiler/options you've using, which is
very error-prone and slows down our responsiveness.  If you don't use
the PRF, therefore, it is less likely that someone from the core
ACE+TAO developer team will be able to answer your question.
Naturally, we encourage and appreciate other members of the ACE+TAO
user community who can respond to questions that they have the answers
to.

>int create_result = conn_handler.activate(
>                                THR_NEW_LWP | THR_JOINABLE |
>THR_SUSPENDED,
>                                1,1,
>                                ACE_THR_PRI_OTHER_DEF);
>        ACE_ASSERT(create_result == 0);
>
>        ACE_TRY_CHECK
>
>OS : RedHat
>
>after acrivate(), I don't call resume() and wait() in main function.
>however, when program running the thread automatically
>execute, please why?

Because THR_SUSPENDED is not supported on all OS platforms,
particularly those like Linux that implement the POSIX Pthreads model.
Please see Chapter 9 of C++NPv1 <www.cs.wustl.edu/~schmidt/ACE/book1/>
and Chapter 6 of C++NPv2 <www.cs.wustl.edu/~schmidt/ACE/book2> for
details.

Thanks,

        Doug
-- 
Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu



More information about the Ace-users mailing list