Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112582 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 29543 invoked from network); 22 Dec 2020 00:26:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Dec 2020 00:26:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 13B5C1804E1 for ; Mon, 21 Dec 2020 15:59:26 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12olkn2043.outbound.protection.outlook.com [40.92.23.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 21 Dec 2020 15:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VeDhNggQErJ2k1QTbBIKwLDTO8RgOXlZEtQm7VyUnIrhf2tWoGXndOUVDi9mbkLzbuNdNY+7Djq9KF5z2Ep+fVgxTs7Fjn5H7sStQQuUpwv+Hh411mfhqcr2Zt+9HBc6ixGnKOy/UfB1Sb/lWb4hUqQDcIw3IPAbDSrXUH5KUeVhJ1j/U+qyOeeJ+/BnJZOpf0dV9v2BNY2Iuza/3nUUU32drUanNU2GtLDRGrAdr33lfDQY9drf/rFVoY6y/LZagA3fr84MQGhbX6bDgZ2PGUfbIea5LopVNtNj0888wZ224Mpo/v+AcxkOccj4mgoE8g54PD7053/jxIsq82pvOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HEMxIsY5wwSpxJeDI/rKdauj7Dt3tpSvqivkZhhWuw0=; b=HMeL+DLzBA0OTrL4npBELFktFUbROm7urCjAc38uyK6JeG7/zkJitHyt614+IG9+moddk+6fI6ih95w24gZZl1P6pWYyQCTSVW/etbMXP2uh5434LEkk1cBHnGYr3MtDFRgZKRMjiQM73NNb6jTta2gQseSFafYPoG9vU4wAn2wHR5u0yVRp/Cydej5yXhW0nUs2qg7LPzW3ncAn3cuup0RV8Ci0XVCutgxnAWnVot9GngXm4rGqZRbversXapqv08hIEzBs/G4F/1bQJfY8ozjUTl+mmhKP0BkNYwmTbiCe14YrC+1XEBLpQQczz5o4UseCA6l3X9BEyXjCYQ1fxw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HEMxIsY5wwSpxJeDI/rKdauj7Dt3tpSvqivkZhhWuw0=; b=m1IqWPSvx+YgySsYTd/hSFq9YItlhNMN0524JLl9NLmIXOXDcnhTN9AVNBeK+MlkmjdrA68S8QUwb6eWiSH/yM8nPQWzXi4xh1XB9gFbZrh9rZZB5GTIPHm/4TeA7SptnX8/GWiLVPeQjMNlzXUQMpNIdc0hNc6xcQUrglp0+tJobx0DIQDkCmKIedp0YkZZRsZpVjutnGcb8ut0qJBL9aV99bDZt94Hyy85V0oFoABeYQjgsifL7PHpztMuaJwIX/GzVJDb+rP16reqZoYPwE42Xx9Ye7EjpLZuPsFTQkl3bkF6/xe5Mpu4o3uQvfRy91J3hPE689wb7zvA/NWFjA== Received: from BN8NAM12FT024.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc66::50) by BN8NAM12HT200.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc66::330) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.19; Mon, 21 Dec 2020 23:59:23 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com (2a01:111:e400:fc66::53) by BN8NAM12FT024.mail.protection.outlook.com (2a01:111:e400:fc66::288) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.10 via Frontend Transport; Mon, 21 Dec 2020 23:59:23 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::b4c4:dc11:5337:821d]) by DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::b4c4:dc11:5337:821d%4]) with mapi id 15.20.3676.033; Mon, 21 Dec 2020 23:59:23 +0000 To: Mike Schinkel , Aaron Piotrowski CC: php internals Thread-Topic: [PHP-DEV] [RFC] Fibers Thread-Index: AQHW1JH3Qg2ZcNIGwEee0GXThHxj4KoCKXyAgAAUd4w= Date: Mon, 21 Dec 2020 23:59:23 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:C9568F73905DBC28635F0363A58407E634EDACBDA3622223993EA8156E8E2BF7;UpperCasedChecksum:30A056DC96312CABF72F5F411358819C2C53E5AA90973725BCFB23AE33010D33;SizeAsReceived:7076;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [pxavYZgQ2DGA1WqN6hxXisVPB7YwRBwXOXuq1aJtpQBwic7A8PHZWVpD+Jno9y0S] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 7c4f6eb1-db6b-4cf1-d2ba-08d8a60c709e x-ms-traffictypediagnostic: BN8NAM12HT200: x-ms-exchange-minimumurldomainage: golang.org#4140 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: W7yfJ9J62vBVU4dgcDk39aniYFhV1q+VlzRL8Yeh5XRPESwff0C9R8nbLGrYksqDdn2cP8NyGh0ajzryRrElNoenOew8GB8FYUUwoPzJq4hYaBH16vrPUrKEins09VryEShP7YBp/3CxBxyLK43gHsJc6G0KNWivca7b7azs3tj1Z3BX4VpcwgP4IEkW/tu7fCKilfmUBxauAqQzpLhDIAJmJWKVbrjKxUziwCvh6EPd+aDZL/YKWjki2go7l2N77LnAM2rsP5Hp2B/fDtVm5iHesdoEtK0IvNoG9iY5lPU= x-ms-exchange-antispam-messagedata: CoP1Lwt+9YdUACoErTr68n9yKmylzRew/TEatBgO4WyuJ41NFnOCL24UOIT0fspdg67u0lWgA7sbddG+FDjYWl/VQp6xLreTAwEryVnuT45TNyCR4RuyB0AFfZWnlyitaXl2ZRTdRDVnfweD7sVQxzQszCx0m9aMVBkoB+kzV5H1pyGKJjuMA4YAdZ85HpdWhUlri0EMd9suIeoW87jWyQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: BN8NAM12FT024.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 7c4f6eb1-db6b-4cf1-d2ba-08d8a60c709e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Dec 2020 23:59:23.1680 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8NAM12HT200 Subject: Re: [PHP-DEV] [RFC] Fibers From: tysonandre775@hotmail.com (tyson andre) Hi Mike Schinkel,=0A= =0A= >=A0This is interesting, and potentially very useful.=0A= >=A0=0A= > I am curious about how you propose access to shared memory across fibers?= =A0 What will happen if two fibers try to update a $GLOBALS variable at the= same time?=A0 Or a property of the same object?=A0 How will developers man= age that?=0A= =0A= (I started writing this before Aaron sent a different response)=0A= =0A= [Concurrency is not parallelism](text of https://blog.golang.org/waza-talk = , not the video),=0A= and this RFC isn't adding parallelism to php.=0A= Instead, the RFC is a proposal to make concurrency easier.=0A= The rfc announcement email says that "fibers exist within a single thread".= =0A= A fiber would have to explicitly release control to the scheduler after mod= ifying a $GLOBALS variable, etc.=0A= =0A= As I understand it, this proposal is similar to how concurrency works in no= de for code written in JS - https://stackoverflow.com/questions/29977049/ho= w-does-concurrency-work-in-nodejs=0A= (in that there's only one thread, but it's different in that scheduling is = done manually)=0A= =0A= Thanks,=0A= - Tyson=