Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101008 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96579 invoked from network); 1 Nov 2017 09:13:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Nov 2017 09:13:31 -0000 Authentication-Results: pb1.pair.com header.from=i@lvht.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=i@lvht.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lvht.net from 54.204.34.130 cause and error) X-PHP-List-Original-Sender: i@lvht.net X-Host-Fingerprint: 54.204.34.130 smtpbguseast2.qq.com Received: from [54.204.34.130] ([54.204.34.130:54643] helo=smtpbguseast2.qq.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/D7-07742-33099F95 for ; Wed, 01 Nov 2017 04:13:25 -0500 X-QQ-mid: bizesmtp1t1509527598tl4b05lmx Received: from [10.23.164.64] (unknown [222.73.196.18]) by esmtp4.qq.com (ESMTP) with id ; Wed, 01 Nov 2017 17:13:17 +0800 (CST) X-QQ-SSF: 0110000000200050F550B00A0000000 X-QQ-FEAT: 6dXuswn9i1W2exoCeE8xyFvD8MAEqHH5fMgoST1NIyL8srYODS3tvtE/La5vN nlaomRk2yZWUrPehYRvfU318+hN3+o0a44cw+/vP4juBKjEW16NaN/LNYBNaGItWyDW/Ki3 yku/B9AqJGz9cUfqCBkUzvbpiJJrJM829SSznbgPI/VsvJPo5Xkg4r3bf25705H2CwajPsH 7iPKKOOT8ekkrHG853wyKjyxsWDh5s8A1r42e3p+WgIxpIRq5GtKmd915E42UyqkrdaMzQS fpGpXMAXA5VhzoaPq6ZupHW6A= X-QQ-GoodBg: 0 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) In-Reply-To: Date: Wed, 1 Nov 2017 17:13:16 +0800 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <6B9B9796-F66E-45EC-B5CC-58051170F2F2@lvht.net> References: <736B46E8-9458-4E63-8BB7-AF93A8C35F58@lvht.net> To: Dmitry Stogov X-Mailer: Apple Mail (2.3445.4.7) X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:lvht.net:qybgforeign:qybgforeign2 X-QQ-Bgrelay: 1 Subject: Re: [PHP-DEV] RFC - Zend VM Pause API From: i@lvht.net (Haitao Lv) Would it proper to introduce the following path? diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 9bed9f86bb..cf0935df74 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -8920,13 +8920,19 @@ ZEND_VM_DEFINE_OP(137, ZEND_OP_DATA); ZEND_VM_HELPER(zend_interrupt_helper, ANY, ANY) { + int8_t interrupt_type =3D EG(vm_interrupt); + EG(vm_interrupt) =3D 0; if (EG(timed_out)) { zend_timeout(0); } else if (zend_interrupt_function) { SAVE_OPLINE(); zend_interrupt_function(execute_data); - ZEND_VM_ENTER(); + if (interrupt_type =3D=3D 2) { + ZEND_VM_RETURN(); + } else { + ZEND_VM_ENTER(); + } } ZEND_VM_CONTINUE(); } > On 1 Nov 2017, at 16:54, Haitao Lv wrote: >=20 > It seems that set EG(vm_interrupt) to 1 could not stop the vm = execution but only execute the interrupt_function and continue the = current execution. >=20 > However, my RFC propose to stop the current execution. >=20 >> On 1 Nov 2017, at 16:07, Dmitry Stogov wrote: >>=20 >> Hi, >>=20 >> It should be possible do similar things using EG(vm_interrupt) and = zend_interrupt_function() callback (introduced in php-7.1) >> ext/pcntl implements asynchronous signal handling using this. >>=20 >> Thanks. Dmitry. >> From: Haitao Lv >> Sent: Wednesday, November 1, 2017 4:19:07 AM >> To: PHP Internals >> Subject: [PHP-DEV] RFC - Zend VM Pause API=20 >>=20 >> Hi, internals, >>=20 >> I propose to introduce a new zend vm pause api, and here is the RPF >>=20 >> https://wiki.php.net/rfc/zend-vm-pause-api = >>=20 >> Please gave your comment. >>=20 >> Thank you. >>=20 >>=20 >>=20 >> --=20 >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php =