Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: (qmail 856 invoked from network); 28 Jul 2009 11:03:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Jul 2009 11:03:45 -0000 Received: (qmail 3454 invoked by uid 500); 28 Jul 2009 11:05:02 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 3404 invoked by uid 500); 28 Jul 2009 11:05:02 -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 3394 invoked by uid 99); 28 Jul 2009 11:05:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jul 2009 11:05:02 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of covener@gmail.com designates 209.85.220.210 as permitted sender) Received: from [209.85.220.210] (HELO mail-fx0-f210.google.com) (209.85.220.210) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jul 2009 11:04:53 +0000 Received: by fxm6 with SMTP id 6so1523030fxm.24 for ; Tue, 28 Jul 2009 04:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=+7dMyZbQm63gQDUmhczFL20lC9AbQwA5ZsSUOUG/z/A=; b=JF4aNGb6w+FhQL37fY7aibTUkh/yJctPYGqaPpCypt/bJJdtZ9tSE3KcDWHScjWWxh xUmvcMCWVzlaonbid2QqvI0E/Wh+xUycvV89oyFI2So4j1RijCuSzq5mcPvdV+SrW1Ga KV2ODMEbDVwxBwPELFfWe61DJKwayAf8iDCiM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=JaXfgpG9VYCutYfHilrUqRGiDgxbofnHUGvem2kyHlcP9n4cLU/+EhzcBPgQnwDctN MugzzkS6Ri8ixSKdrkgI45PmwlLlZQpXBfs1VhPnjeaNKQpMAvvyl1gMXEb1ALmTfQUz PAux/ReKMeYEr42ZgDVMvg4eSs17i3DZnO5jY= MIME-Version: 1.0 Received: by 10.223.126.66 with SMTP id b2mr3205739fas.3.1248779072482; Tue, 28 Jul 2009 04:04:32 -0700 (PDT) In-Reply-To: <24697041.post@talk.nabble.com> References: <24697041.post@talk.nabble.com> Date: Tue, 28 Jul 2009 07:04:32 -0400 Message-ID: <1404e5910907280404i614b055esb495a77530a15273@mail.gmail.com> Subject: Re: Threads From: Eric Covener To: modules-dev@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Jul 28, 2009 at 6:59 AM, ricardo13 wrote: > > Hi, > > I'm using Worker MPM and would like to implement a module that uses 2 > threads and one array. > The first thread works adding requests in array. Just it. > And second thread schedules requests in array to processing. > > I used post_config() hook for initialize structures and creates threads. > What hook do I use for threads ?? Because if I initialize in post_config, > how thread run after post_request_read and before content generator ?? You can't have your dedicated thread directly "invoked" during the apache hooks. You need to write normal methods that will be invoked by the normal request-processing threads, and talk to your standalone thread via some type of non-Apache-specific IPC. -- Eric Covener covener@gmail.com