From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: "Asynchronous Requests from Emacs Dynamic Modules" Date: Sun, 01 Nov 2020 20:28:53 +0200 Message-ID: <837dr5exsq.fsf@gnu.org> References: <86imarfldb.fsf@akirakyle.com> <86y2jn9j70.fsf@163.com> <83pn4y96ut.fsf@gnu.org> <83lffmhi5y.fsf@gnu.org> <83h7qahe03.fsf@gnu.org> <86ft5ufb95.fsf@akirakyle.com> <831rhegnde.fsf@gnu.org> <86d00yexw7.fsf@akirakyle.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39128"; mail-complaints-to="usenet@ciao.gmane.io" Cc: p.stephani2@gmail.com, emacs-devel@gnu.org, yyoncho@gmail.com, monnier@iro.umontreal.ca, all_but_last@163.com To: Akira Kyle Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 01 19:29:50 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZI6v-000A6m-D5 for ged-emacs-devel@m.gmane-mx.org; Sun, 01 Nov 2020 19:29:49 +0100 Original-Received: from localhost ([::1]:35350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZI6u-0002Qz-GW for ged-emacs-devel@m.gmane-mx.org; Sun, 01 Nov 2020 13:29:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZI6K-00020D-HU for emacs-devel@gnu.org; Sun, 01 Nov 2020 13:29:12 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58780) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZI6J-0002ym-1v; Sun, 01 Nov 2020 13:29:11 -0500 Original-Received: from [176.228.60.248] (port=2634 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZI6E-0005Kv-Hd; Sun, 01 Nov 2020 13:29:09 -0500 In-Reply-To: <86d00yexw7.fsf@akirakyle.com> (message from Akira Kyle on Sat, 31 Oct 2020 18:14:32 -0600) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258604 Archived-At: > From: Akira Kyle > Cc: yyoncho@gmail.com, all_but_last@163.com, emacs-devel@gnu.org, > monnier@iro.umontreal.ca, p.stephani2@gmail.com > Date: Sat, 31 Oct 2020 18:14:32 -0600 > > It seems the lisp threading functionality is still pretty beta > quality. Have the data races that Chris Wellons mentions here [1] > ever been addressed? It's hard to tell, because that blog has no specifics, just a broad accusation. It is also quite old. > It looks like it's mostly just exposing the pthread interface. That's simply not true. It _uses_ pthreads to start and manage threads, and to implement mutexes, condvars, etc. But if you look closely at the level of thread.c (_not_ systhread.c), you will see something very different from a typical pthreads application. > What is the use case for the current lisp threads given the severe > limitation that only will ever run at a time and the constraints the > cooperative nature puts on when threads can switch? The main use case is to allow you to write one or more background Lisp programs that go about their job while a foreground command lets the user interact normally with Emacs.