Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E3F2217B87 for ; Tue, 30 Sep 2014 16:16:43 +0000 (UTC) Received: (qmail 57617 invoked by uid 500); 30 Sep 2014 16:16:43 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 57576 invoked by uid 500); 30 Sep 2014 16:16:43 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 57562 invoked by uid 99); 30 Sep 2014 16:16:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Sep 2014 16:16:43 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ylavic.dev@gmail.com designates 74.125.82.45 as permitted sender) Received: from [74.125.82.45] (HELO mail-wg0-f45.google.com) (74.125.82.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Sep 2014 16:16:17 +0000 Received: by mail-wg0-f45.google.com with SMTP id m15so2717343wgh.16 for ; Tue, 30 Sep 2014 09:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=LvDZyaKWh236e+OAqm5qYoSRE/Q/+AZVgWxU/qownXA=; b=zJz+fGKNXAAvU6XHSFenhUKbHGKGncb0T3hbVT8CDaRMkN1Fy+z34nTObmEgIWj0EX sT2H9o6ApL979odcyfGRbndW6VNhrXk1yONg62CLfyNmdv2rfeHFUDNA8wQNoFTLsLaJ wUa6qhRF+QHz/4HHw3kXtXFnNA8ywjp78oSjVMP8i9bhGzwwdPT1aK0wjQALwYckpL4m h3u4VKJ6y8gkv+nVeI63iHB5J6tXCKFqbm0mp1TMK2H3tkwS60xPZVvAr6GJ2lWVgFx1 OI/C/1zQAG2eLfYetA6iBhzzSx6Z3YXsZ9sDsU6oy3BnzmQ1vP6/uVlCbSqJGAudNReH Dyug== MIME-Version: 1.0 X-Received: by 10.194.185.199 with SMTP id fe7mr55691218wjc.7.1412093776415; Tue, 30 Sep 2014 09:16:16 -0700 (PDT) Received: by 10.216.13.66 with HTTP; Tue, 30 Sep 2014 09:16:16 -0700 (PDT) In-Reply-To: References: <54295C2F.80307@lenk.info> Date: Tue, 30 Sep 2014 18:16:16 +0200 Message-ID: Subject: Re: How to wait on a global lock with timeout From: Yann Ylavic To: modules-dev@httpd.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Sep 30, 2014 at 5:30 PM, Yann Ylavic wrote: > I have been working on a patch to provide > apr_[thread/proc]_mutex_timedlock() in APR, but did not finish the > work mostly because of APR_ENOTIMPL on some mutex mechanisms (mainly > Windows CRITICAL_SECTIONs which lack the functionality, making the APR > abstraction quite useless IMO, or at least unix specific). Maybe I'll > have a new look at it these days if I have the time to. Hmm, this remark about Windows only concerns thread-mutexes, proc-mutexes don't use a CRITICAL_SECTION but a HANDLE (which is then usable with WaitForSingleObject() that accepts a timeout). I think I'll give my patch a new chance, at least for proc-mutexes (and hence global-mutexes), but this is not a today's solution in any case since I would be at best an APR-1.6 feature (if accepted)...