From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Example of threads and concurrency? Date: Sat, 18 Feb 2017 21:41:59 +0200 Message-ID: <83shnbp9q0.fsf@gnu.org> References: <87tw81sudh.fsf@ericabrahamsen.net> <87h93r49wh.fsf@ericabrahamsen.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1487446962 6411 195.159.176.226 (18 Feb 2017 19:42:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Feb 2017 19:42:42 +0000 (UTC) Cc: eric@ericabrahamsen.net, emacs-devel@gnu.org To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 18 20:42:35 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 1cfAtr-0000Yo-Hl for ged-emacs-devel@m.gmane.org; Sat, 18 Feb 2017 20:42:31 +0100 Original-Received: from localhost ([::1]:59661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfAtv-0005gC-Fq for ged-emacs-devel@m.gmane.org; Sat, 18 Feb 2017 14:42:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfAtI-0005g3-1a for emacs-devel@gnu.org; Sat, 18 Feb 2017 14:41:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfAtD-0007P7-Cq for emacs-devel@gnu.org; Sat, 18 Feb 2017 14:41:56 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfAtD-0007P0-9K; Sat, 18 Feb 2017 14:41:51 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3429 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cfAtA-0003nV-FZ; Sat, 18 Feb 2017 14:41:50 -0500 In-reply-to: (message from Noam Postavsky on Sat, 18 Feb 2017 14:23:22 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:212451 Archived-At: > From: Noam Postavsky > Date: Sat, 18 Feb 2017 14:23:22 -0500 > Cc: Emacs developers > > On Sat, Feb 18, 2017 at 1:43 PM, Eric Abrahamsen > wrote: > >> I update the variable with a time-consuming/network-bound > >> computation. I want the computation to happen in a thread so it > >> doesn't block, > > You're out of luck, only one thread runs at a time. Only one thread runs at a time, but "network-bound" sounds like it could yield from time to time, if it calls accept-process-output and its ilk.