From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: HaiJun Zhang Newsgroups: gmane.emacs.bugs Subject: bug#38807: [Feature request]: Support lisp workers like web workers. Date: Fri, 3 Jan 2020 11:34:40 +0800 Message-ID: References: <83o8vpn8g1.fsf@gnu.org> <87mub9u0ld.fsf@gmx.de> <831rslmxih.fsf@gnu.org> <83lfqslafm.fsf@gnu.org> <83r20jjgg3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="5e0eb658_622d8102_4379" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="138257"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38807@debbugs.gnu.org, michael.albinus@gmx.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 03 04:36:25 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1inDl9-000Zol-VZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Jan 2020 04:36:24 +0100 Original-Received: from localhost ([::1]:48316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inDl8-0007sT-As for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jan 2020 22:36:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57766) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inDkp-0007Xx-JR for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2020 22:36:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inDko-0006GP-6E for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2020 22:36:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34332) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1inDko-0006Fl-1S for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2020 22:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1inDkn-0002tA-UE for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2020 22:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: HaiJun Zhang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jan 2020 03:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38807 X-GNU-PR-Package: emacs Original-Received: via spool by 38807-submit@debbugs.gnu.org id=B38807.157802250611033 (code B ref 38807); Fri, 03 Jan 2020 03:36:01 +0000 Original-Received: (at 38807) by debbugs.gnu.org; 3 Jan 2020 03:35:06 +0000 Original-Received: from localhost ([127.0.0.1]:40305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inDjr-0002rp-17 for submit@debbugs.gnu.org; Thu, 02 Jan 2020 22:35:06 -0500 Original-Received: from mail-oln040092253012.outbound.protection.outlook.com ([40.92.253.12]:27968 helo=APC01-SG2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inDjo-0002rE-0y for 38807@debbugs.gnu.org; Thu, 02 Jan 2020 22:35:01 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cwgew9wSHCzwN+XDTwtdNuOSJ2Ev71dvjgv1eLy2RwgR0HPaq+1pzw3tq8qDGB88pTHtDQk1nWxmFpOsQeF0MjHxt9jCb5y+wboYXj5cd1ypzehJaHkroNNCaAX8VK9jc0tjtcHCuCRtGe3jVPKQ6ZzVatHuMqbohkuraG15xwoM/T9j9kxD6I9ZSZcMBNMBp+FxetavNj/ML1VFEXsCbMBrUQrvagjUI2EA2L//KaGLBH/x7YDy7FhoewR8O7Wm3p4qWOhoUxXCLNPJiCbodyCRnJjeMSbCAv9kTISbB4+6SQn5G0qh40dU6/wK0ajmlES2ggsxmyUVuPvd1HrP1Q== 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=pm1hPyV3n4GPbZGyMaJdVlOG73JGqhDMS+waqmJwWng=; b=S9aPPHVb9NCKHSiwswg6w0Ryu8+1EVUlH89flPy84NvMjc/Z5SDXYOVIEb6ESJ5WAJdhghALMPADCNLfxiTVBWTvxNRy0rpASKNstdwOpIoDDh/j285q4pzlFk6JokuVh/dcq0qeQL9EQOLDqiZ61LVL6yMerDguQV0vbOIW6/0SpiJX+2AXVL6gI9lc10Nzua1oS5REE1bFNd7KXy6tpcaR6gE3az5NH+euOQgXawTdpFGGRE6Dj8NMts3CXFl0Qhq7+GjwoqHJI9R77nUUzWbtTrcDzVFuj5cznK3mJenMORfFTE+6tZQGqYD9xFgz2WFmUSXrqrhXdvX9n+U9VA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pm1hPyV3n4GPbZGyMaJdVlOG73JGqhDMS+waqmJwWng=; b=GkHokkh1SzxFuhNYVxR03aTiDnS3mbSFvZmnaLBVwqNx2bRx3SIwJEW+kuxu3z6MXIW4XGeB9l7lAr0hvltZN+P4BCEGgWhtvbnc0pMTm0SYZSu7slZqwHlZ8B+ECiC1XWC3io6uFV9SMeI90LQt+H8PX6pfM+Ykj1LSgY0fra3HrGgLAWsIDQcWRanah0p7QyiNB3KybSxq0siPVy4iX9RpB/hTmEqyFgrM98L2vaxNYP46fjdsvHlv/2dFE3S/SN/yld2iJiqqatvNfqg5EOuPtElt8NnUI9r7GZ9zME0eOKSmepd7I+uUBzqB+hcgqLKBtzOBx0VHBvV0LuVlwQ== Original-Received: from HK2APC01FT028.eop-APC01.prod.protection.outlook.com (10.152.248.55) by HK2APC01HT026.eop-APC01.prod.protection.outlook.com (10.152.249.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11; Fri, 3 Jan 2020 03:34:51 +0000 Original-Received: from PS1PR03MB3606.apcprd03.prod.outlook.com (10.152.248.51) by HK2APC01FT028.mail.protection.outlook.com (10.152.248.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11 via Frontend Transport; Fri, 3 Jan 2020 03:34:51 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:DBFDF814B7889F28A51CDAEE88B44BF89EDAFC1D28E63C59D95BFFE2DBB52279; UpperCasedChecksum:E73605231EC6EF155CD4E35B703A890B2FEE330E980D8E13C0760B4D120F5AF7; SizeAsReceived:9108; Count:48 Original-Received: from PS1PR03MB3606.apcprd03.prod.outlook.com ([fe80::b470:80bc:efed:9117]) by PS1PR03MB3606.apcprd03.prod.outlook.com ([fe80::b470:80bc:efed:9117%7]) with mapi id 15.20.2623.002; Fri, 3 Jan 2020 03:34:51 +0000 In-Reply-To: <83r20jjgg3.fsf@gnu.org> X-Readdle-Message-ID: a7ecdd7d-6bcb-41ad-bf73-8e03d3e3f8e5@Spark X-ClientProxiedBy: HK2PR06CA0003.apcprd06.prod.outlook.com (2603:1096:202:2e::15) To PS1PR03MB3606.apcprd03.prod.outlook.com (2603:1096:803:4e::17) X-Microsoft-Original-Message-ID: Original-Received: from [192.168.1.103] (1.193.170.223) by HK2PR06CA0003.apcprd06.prod.outlook.com (2603:1096:202:2e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11 via Frontend Transport; Fri, 3 Jan 2020 03:34:50 +0000 X-Readdle-Message-ID: a7ecdd7d-6bcb-41ad-bf73-8e03d3e3f8e5@Spark X-Microsoft-Original-Message-ID: X-TMN: [Xmr/ALZMWj7lxk3f+R/dt6vNQ/fLzNML] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: f55c99c9-4d89-4849-2346-08d78ffde42e X-MS-TrafficTypeDiagnostic: HK2APC01HT026: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Tb1r2tMUTT/1KDp7nJ3iqzHGZVsNke/oGIxH7SR31luEiCvmwYBVPubb5WJEZnvJnY4yg8S/6oEd1obFSqGH1HJ3n6XkCW447EaG0XoexQKGF6kfk9KLcKz3QuoMUhJ0DcTcI4NdvyOjkxJJ6Lu8dkIpYb/KBOJUP+vdwhEcnQqjwhcyVb9Wgkpkt4IgOzjNuqatR/XXDm1q0tslhW5MmWYQnSqeWFMBzQbjVZDW0Gk= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f55c99c9-4d89-4849-2346-08d78ffde42e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2020 03:34:51.6269 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT026 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174094 Archived-At: --5e0eb658_622d8102_4379 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =E5=9C=A8 2020=E5=B9=B41=E6=9C=882=E6=97=A5 +0800 AM12:21=EF=BC=8CEli Zar= etskii =EF=BC=8C=E5=86=99=E9=81=93=EF=BC=9A > > Then these threads cannot really run Lisp at all, nor even directly > affect Lisp data. So in effect you want to be able to run threads > that don't enter the Lisp interpreter, nor modify any Lisp data. =46or web worker, they have different contexts. The following is from MDN= (https://developer.mozilla.org/en-US/docs/Web/API/Web=5FWorkers=5FAPI/Usi= ng=5Fweb=5Fworkers): workers run in another global context that is different from the current=C2= =A0window. Thus, using the=C2=A0windowshortcut to get the current global = scope (instead of=C2=A0self) within a=C2=A0Worker=C2=A0will return an err= or. The worker context is represented by a=C2=A0DedicatedWorkerGlobalScope=C2= =A0object in the case of dedicated workers (standard workers that are uti= lized by a single script; shared workers use=C2=A0SharedWorkerGlobalScope= ). A dedicated worker is only accessible from the script that first spawn= ed it, whereas shared workers can be accessed from multiple scripts. --5e0eb658_622d8102_4379 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
=E5=9C=A8 2020=E5=B9=B41=E6=9C=882=E6=97= =A5 +0800 AM12:21=EF=BC=8CEli Zaretskii <eliz@gnu.org>=EF=BC=8C= =E5=86=99=E9=81=93=EF=BC=9A

Then these threads cannot really run Lisp at all, nor even directly
affect Lisp data. So in effect you want to be able to run threads
that don't enter the Lisp interpreter, nor modify any Lisp data.  
=

For web worker, they have different contexts. The following is from MD= N(https://developer.mozilla.org/en-US/docs/Web/API/Web_= Workers_API/Using_web_workers):

workers run in another global context = that is different from the current windowshortcut to get the current global scope (instead of&n= bsp;self) within a=  Worker will return an error.

The worker context is represented by a=  DedicatedWorkerGlobalScope = object in the case of dedicated workers (standard workers that are utilized= by a single script; shared workers use SharedWorkerGlobalScope). A dedicated worker is only = accessible from the script that first spawned it, whereas shared workers ca= n be accessed from multiple scripts.


--5e0eb658_622d8102_4379--