From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Support threads in modules Date: Sat, 22 Apr 2017 19:21:35 +0000 Message-ID: References: <20170422152444.48735-1-phst@google.com> <83zif8p8d3.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c0d7e82f06188054dc648c9 X-Trace: blaine.gmane.org 1492888914 13038 195.159.176.226 (22 Apr 2017 19:21:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Apr 2017 19:21:54 +0000 (UTC) Cc: phst@google.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 22 21:21:50 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d20bO-0003I0-Bz for ged-emacs-devel@m.gmane.org; Sat, 22 Apr 2017 21:21:50 +0200 Original-Received: from localhost ([::1]:36632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d20bT-0001x8-NW for ged-emacs-devel@m.gmane.org; Sat, 22 Apr 2017 15:21:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d20bO-0001ws-3K for emacs-devel@gnu.org; Sat, 22 Apr 2017 15:21:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d20bN-0002Rp-76 for emacs-devel@gnu.org; Sat, 22 Apr 2017 15:21:50 -0400 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:38365) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d20bL-0002RC-JY; Sat, 22 Apr 2017 15:21:47 -0400 Original-Received: by mail-wm0-x233.google.com with SMTP id r190so39515815wme.1; Sat, 22 Apr 2017 12:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DwomUuMCl1+ZkGwTAo2vrtFOS55vIWi7Mh5CnQ2aA84=; b=KRxF4YVssEB4Sve+Ye9yygDrzRQctHPheBTWwaWz52laxFQTjBaKKKZD+TBbTRYMa4 3KfEfenJufVmDfVgM0A7mY6ZfPVYwWuceIPRBz4fyOrL+OfjN7qsE+HuBfFLO5IKVOhV VP452Rj5+Q1gEJ9HssGC/TW7e4AkGG92BssGiSS8ZW7unOE55HNH+M9AMo946MGFGefz mSxMFEUH0D0Ju6II4whvv2fcFw3/MTM/QzfBNa+V4he0N8FfxxlBbssj0mOijRZ43Cz6 /mF5X2D2D1vvSmM9URYeyCU5vH7qwU8BEjbmnf5OYz823mQlbA1Qx0fp6LTWPpGbn4LH HMWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DwomUuMCl1+ZkGwTAo2vrtFOS55vIWi7Mh5CnQ2aA84=; b=WkImYZRa/TKtRF6LH1Gc+4Ti44vFpadDQ1f72rfMsh36YoiIROSvD1L1cdTps/9L8I pKYivLrYO1xgiW5+yw7CwUCvIOAX1G6gAd/4Qiep43AS4e3n919TR7VKfDP221tHRJyI 817/ZQm+LTnOMPzLkpFnKxmLvmM7bi9gzuBEBJBcVV9Ni0wi5oVrBr6fLk5+ZQUQgBqG 0jk4NrkbDSjmv/NnuUXTCRHAiZkI7PKUy7ZhE8yhmF4N2Tar2TxhYUrC6lIQuMFPhOTB vb26mO/7nOt6ErjNSwMDgxE12jvo+GhwQUVu0V4ug/gHafgWvCsmY12kyKF3p1clk0VE HRYA== X-Gm-Message-State: AN3rC/4VYU6ERxUYScqPnaDS5pkQoLEr86DDJfz9J2JEUGUF6oE3M1IN LzljQ+hlzdWNyBeiEu0N75UZERXEHZ5OIXc= X-Received: by 10.28.199.76 with SMTP id x73mr3839776wmf.95.1492888906124; Sat, 22 Apr 2017 12:21:46 -0700 (PDT) In-Reply-To: <83zif8p8d3.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214221 Archived-At: --94eb2c0d7e82f06188054dc648c9 Content-Type: text/plain; charset=UTF-8 Eli Zaretskii schrieb am Sa., 22. Apr. 2017 um 21:09 Uhr: > > From: Philipp Stephani > > Date: Sat, 22 Apr 2017 17:24:44 +0200 > > Cc: Philipp Stephani > > > > Rather than checking for the main thread, store the owning thread in > > the module structures and check for it. > > Can you explain the purpose of these changes and the motivation? A > module shouldn't be restricted to be used by a single thread, should > it? > > No, but the thread used to create an environment object, the current Emacs thread, and the current OS thread all have to match. Right now this isn't checked; the current code checks only for the main thread, which isn't correct any more now that there can be more than one interpreter thread. --94eb2c0d7e82f06188054dc648c9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Sa., 22. Apr. 2017 um 21:09=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sat, 22 Apr 2017 17:24:44 +0200
> Cc: Philipp Stephani <phst@google.com>
>
> Rather than checking for the main thread, store the owning thread in > the module structures and check for it.

Can you explain the purpose of these changes and the motivation?=C2=A0 A module shouldn't be restricted to be used by a single thread, should it?


No, but the thread used to create an e= nvironment object, the current Emacs thread, and the current OS thread all = have to match. Right now this isn't checked; the current code checks on= ly for the main thread, which isn't correct any more now that there can= be more than one interpreter thread.=C2=A0
--94eb2c0d7e82f06188054dc648c9--