Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47736 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54922 invoked from network); 2 Apr 2010 07:40:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Apr 2010 07:40:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.216 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.218.216 mail-bw0-f216.google.com Received: from [209.85.218.216] ([209.85.218.216:33656] helo=mail-bw0-f216.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/93-44965-46F95BB4 for ; Fri, 02 Apr 2010 02:40:21 -0500 Received: by bwz8 with SMTP id 8so1357922bwz.23 for ; Fri, 02 Apr 2010 00:40:17 -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:received:message-id:subject:from:to:cc:content-type; bh=NPaivpDj2/jPpvgRW2w1byCTPUNa3LU8lUkruzxaJFc=; b=w37faZC0ZHJTANZ6sCwiAXspsnFXmh/elIFQ8T3o2NKd5FcEGjZ+e8voGm56hoWg5q oYhw04QipwvkFgA3mr13qCm7BLHuVkJC21QECJ+FYyMMgL8UGRQuNOVSH3SoW6cJeHEt OGEKECiVueMM+h01IfSojO/VnMCjTsVk81kJI= 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 :cc:content-type; b=is0+gGu0nanz+Do/O1FBaGgpZ5it0N0VUWl4R+6ZcDyh+O+Vzmv6n7AZTim+N4vzPZ BvQAYB6nw1mzLjOCcPleTbUVyUFZsfshfb2mouGGLMU/qO3Bk0epHDvJelkS2dfStlTd raCJhMHoMHf8bp9qIvAT/rj9+prQUYp9z0tVk= MIME-Version: 1.0 Received: by 10.204.64.200 with HTTP; Fri, 2 Apr 2010 00:40:16 -0700 (PDT) In-Reply-To: <4BB59D29.7080100@lsces.co.uk> References: <1941231697.20100401163215@gmail.com> <698DE66518E7CA45812BD18E807866CE03FA7EFF@us-ex1.zend.net> <4BB59771.2050706@quis.cx> <4BB59D29.7080100@lsces.co.uk> Date: Fri, 2 Apr 2010 09:40:16 +0200 Received: by 10.204.49.83 with SMTP id u19mr2425490bkf.157.1270194016869; Fri, 02 Apr 2010 00:40:16 -0700 (PDT) Message-ID: To: Lester Caine Cc: PHP internals Content-Type: multipart/alternative; boundary=0003255598762bde0c04833c17f6 Subject: Re: [PHP-DEV] php and multithreading (additional arguments) From: tyra3l@gmail.com (Ferenc Kovacs) --0003255598762bde0c04833c17f6 Content-Type: text/plain; charset=UTF-8 On Fri, Apr 2, 2010 at 9:30 AM, Lester Caine wrote: > Jille Timmermans wrote: > >> Op 2-4-2010 7:16, Andi Gutmans schreef >> >>> I think that if we were ever to implement threading we would be best off >>> to enable spawning worker threads that have their own context with no >>> shared data (and therefore no requirement for locking). We could then >>> have a message passing API between the threads. >>> Advantages: >>> - Real multi-threading. >>> - Simple straightforward approach which doesn't require a comp. sci. >>> degree to use correctly. >>> - Very stable implementation. >>> >> That sounds like "I want threading; because it sounds cool!". What are >> the advantages of this above multi-process? >> The systemcall-overhead for message passing? >> > > Actually Andi's outline forms a nice simple base for something practical. > It simply builds on the 'background' threading required to run asynchronous > operations while not creating a unmanageable mess. But I still can't see any > need to go beyond perhaps asynchronous SQL queries. > > Or asynchronous exec, or asynchronous(or at least timout aware) gethostbyaddr, see: http://bugs.php.net/bug.php?id=51306 So any task, that require waiting on external resource could be executed in paralel. http://hu2.php.net/manual/en/mysqli.reap-async-query.php its a good thing, that you can async mysql execution with mysqlnd. Tyrael > It still requires that all the non-thread safe code is addressed first? > Even if that simply means disabling extensions that are not safe? > > > And why did nobody mention Aprils Fools yesterday; when the >> request-for-threading was sent ;) >> > Because it was after noon when it was sent ;) > > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - http://lsces.co.uk/wiki/?page=contact > L.S.Caine Electronic Services - http://lsces.co.uk > EnquirySolve - http://enquirysolve.com/ > Model Engineers Digital Workshop - http://medw.co.uk// > Firebird - http://www.firebirdsql.org/index.php > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --0003255598762bde0c04833c17f6--