Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 25645 invoked from network); 21 Aug 2006 18:01:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Aug 2006 18:01:21 -0000 Received: (qmail 98225 invoked by uid 500); 21 Aug 2006 18:01:19 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 98185 invoked by uid 500); 21 Aug 2006 18:01:19 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 98170 invoked by uid 99); 21 Aug 2006 18:01:19 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Aug 2006 11:01:19 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [212.18.32.4] (HELO out-1.mail.amis.net) (212.18.32.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Aug 2006 11:01:18 -0700 Received: from in-1.mail.amis.net (in-1.mail.amis.net [212.18.32.15]) by out-1.mail.amis.net (Postfix) with ESMTP id C6D155B5B79; Mon, 21 Aug 2006 19:58:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by in-1.mail.amis.net (Postfix) with ESMTP id 0E6782D75B0; Mon, 21 Aug 2006 19:58:21 +0200 (CEST) X-Virus-Scanned: amavisd-new at amis.net X-Spam-Score: -0.421 X-Spam-Level: Received: from in-1.mail.amis.net ([127.0.0.1]) by localhost (in-1.mail.amis.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XvYkRoBsRlQ5; Mon, 21 Aug 2006 19:58:19 +0200 (CEST) Received: from smtp.amis.net (smtp.amis.net [212.18.32.41]) by in-1.mail.amis.net (Postfix) with ESMTP id 4637A2D75AA; Mon, 21 Aug 2006 19:58:19 +0200 (CEST) Received: from mithril.xbc.nu (cpe-213-157-226-100.dynamic.amis.net [213.157.226.100]) by smtp.amis.net (Postfix) with ESMTP id C6164396803; Mon, 21 Aug 2006 19:58:17 +0200 (CEST) Received: from [172.17.19.19] (silmaril.xbc.nu [172.17.19.19]) by mithril.xbc.nu (Postfix) with ESMTP id E3227618B6; Mon, 21 Aug 2006 19:58:16 +0200 (CEST) Message-ID: <44E9F449.2@xbc.nu> Date: Mon, 21 Aug 2006 19:58:33 +0200 From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Mladen Turk Cc: APR Developer List Subject: Re: [PATCH] WIN32 allow destructors for apr_threadkey_private References: <44E9696D.3080802@apache.org> In-Reply-To: <44E9696D.3080802@apache.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-0.421 required=5 tests=[AWL=-0.003, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, RCVD_IN_SORBS_DUL=2.046] X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Mladen Turk wrote: > Hi, > > pthreads have option to register destruct callback > for private thread keys created. > Here is the patch that allow that for WIN32 but > only when compiled as dll. > > Any comments or objections? > The consequence is that the DllMain is added, and > I suppose its not possible to have that functionality > with static apr lib. > OTOH it allows to have the same behavior like with > pthreads actually calling provided callback to > the apr_threadkey_private_create instead just ignoring > it. I've recently learned of a trick that would make this work anywhere, even in a static lib, and wouldn't need DllMain. You can actually insert your own constructors and destructors into the CRT's tables. -- Brane