Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 63857 invoked from network); 26 Jul 2007 18:30:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jul 2007 18:30:39 -0000 Received: (qmail 55074 invoked by uid 500); 26 Jul 2007 18:30:39 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 55056 invoked by uid 500); 26 Jul 2007 18:30:39 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 55019 invoked by uid 99); 26 Jul 2007 18:30:39 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2007 11:30:39 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of msebor@gmail.com designates 209.85.146.182 as permitted sender) Received: from [209.85.146.182] (HELO wa-out-1112.google.com) (209.85.146.182) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2007 11:30:37 -0700 Received: by wa-out-1112.google.com with SMTP id n4so1826739wag for ; Thu, 26 Jul 2007 11:30:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=jWVTPEIfhUimYXVNotLHD3/no3GQK09f2aypjimeuutlQ5LPe7HBzGF+NI8cCO0G49VVu0GTWBtJUVTM0k/rk4+iybj952xKygZDa3oek6PwxZqSHoPkqihK7NJzoDZgKx4p3rACXeAVCKiu5goG3tNbB/UL40Cd9DrG9XBp8uY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=N4/FXU/pLHAKYi8hqHUeUnhkPoxEOYS4WkO3iI8+zTd+bjOr1l4uRLF6/IkUQu5hgXV2DzwnKEC6UQMfeQmoViUusu2SGI4lSaO2N1sTzK2WL8623QV4Q3bgikTazmJJ9+VRoe1kc889uYwBnf39tPzOlwSTJL/ge2EdvwDLlF8= Received: by 10.114.158.1 with SMTP id g1mr2085515wae.1185474617267; Thu, 26 Jul 2007 11:30:17 -0700 (PDT) Received: from ?192.168.1.104? ( [71.229.200.170]) by mx.google.com with ESMTPS id t1sm3894562poh.2007.07.26.11.30.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Jul 2007 11:30:14 -0700 (PDT) Message-ID: <46A8E831.8010700@roguewave.com> Date: Thu, 26 Jul 2007 12:30:09 -0600 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20070719 Fedora/1.0.9-2.fc6 pango-text SeaMonkey/1.0.9 MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: svn commit: r559890 - /incubator/stdcxx/trunk/tests/src/thread.cpp References: <20070726172324.348801A981A@eris.apache.org> <46A8E48E.9040505@roguewave.com> <7BDB2168BEAEF14C98F1901FD2DE6438BB09AF@epmsa009.minsk.epam.com> In-Reply-To: <7BDB2168BEAEF14C98F1901FD2DE6438BB09AF@epmsa009.minsk.epam.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Martin Sebor X-Virus-Checked: Checked by ClamAV on apache.org Farid Zaripov wrote: >> -----Original Message----- >> From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor >> Sent: Thursday, July 26, 2007 9:15 PM >> To: stdcxx-dev@incubator.apache.org >> Subject: Re: svn commit: r559890 - >> /incubator/stdcxx/trunk/tests/src/thread.cpp >> >> faridz@apache.org wrote: >>> Author: faridz >>> Date: Thu Jul 26 10:23:23 2007 >>> New Revision: 559890 >>> >>> URL: http://svn.apache.org/viewvc?view=rev&rev=559890 >>> Log: >>> 2007-07-26 Farid Zaripov >>> >>> * thread.cpp (rw_thread_create) [_WIN32]: Use >> _beginthreadex() instead of CreateThread(). >> >> What are the advantages of calling _beginthreadex() instead >> of CreateThread? I ask because I thought that >> _beginthreadex() was implemented in terms of CreateThread(). > > > The _beginthreadex() allocates and initializes the thread local > data before invoking the user thread function, and frees that data > after return from user thread function. > >>>From MSDN: > ---------- > A thread in an executable that calls the C run-time library (CRT) > should use the _beginthread and _endthread functions for thread > management rather than CreateThread and ExitThread; this requires > the use of the multi-threaded version of the CRT. > ---------- Wow, that sounds pretty important! I can't find this statement on the _beginthread() page though (below). Do you have a link? http://msdn2.microsoft.com/en-us/library/kdzttdcb(VS.80).aspx Martin