From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: Asynchronous event loop brainstorm at FSF 30 Date: Wed, 18 Nov 2015 17:36:57 +0100 Message-ID: References: <87k2r3tvzh.fsf@dustycloud.org> <87h9kj5q7g.fsf@dustycloud.org> Reply-To: mikael@djurfeldt.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1447864643 17492 80.91.229.3 (18 Nov 2015 16:37:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Nov 2015 16:37:23 +0000 (UTC) Cc: guile-devel To: Christopher Allan Webber Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Nov 18 17:37:23 2015 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zz5jG-00033i-6W for guile-devel@m.gmane.org; Wed, 18 Nov 2015 17:37:06 +0100 Original-Received: from localhost ([::1]:36831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz5jF-0002J3-C4 for guile-devel@m.gmane.org; Wed, 18 Nov 2015 11:37:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz5j9-0002IG-3Q for guile-devel@gnu.org; Wed, 18 Nov 2015 11:37:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zz5j8-00063e-6f for guile-devel@gnu.org; Wed, 18 Nov 2015 11:36:59 -0500 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:34481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz5j7-00063U-VQ for guile-devel@gnu.org; Wed, 18 Nov 2015 11:36:58 -0500 Original-Received: by wmvv187 with SMTP id v187so287363448wmv.1 for ; Wed, 18 Nov 2015 08:36:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=UWw8q4VAcPXpWDFMLz2BhVkszpPKikBfKvgZU+3uniI=; b=DZvEaAqKcrM5C5O1U8bd93/qWT6LZhgj5R/glGYUjjbREy32OPha22xu4/oEcwvWjp y8lWHk1niGuvKFK+K55D6J0LOdO1TIv9IVeNGFzoIWvPvT6D84Ofr6/ye08yYm/vjdQV FiiQ+KhsIjtWjTncJI1D+k/ZaYT828IojdOnS2mJgZ+QSbm33jFOgEQX7/RLTeZRXLZJ qZEahw4c2UqiJarJu5vTUC8tkiJYy46VnkJ2D+2UTGvgNhrSB2m0kksHKUqJrghEwF6C VlAKeBT1vabGwp5meRxeyK12yLKIsBRhixitNb7Bs6KR13MRvpT5awHJmx5/2BZ9RkWo iMLA== X-Received: by 10.28.214.146 with SMTP id n140mr5053238wmg.47.1447864617373; Wed, 18 Nov 2015 08:36:57 -0800 (PST) Original-Received: by 10.27.49.16 with HTTP; Wed, 18 Nov 2015 08:36:57 -0800 (PST) In-Reply-To: <87h9kj5q7g.fsf@dustycloud.org> X-Google-Sender-Auth: lXAvAuqJ6mZ8oVqTTKe7eghVtWY X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::233 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:18041 Archived-At: Yes. I'm sure both you and Mark can judge this better than can, currently. I just didn't think Guile was that thread-unsafe. I imagined you would have to use mutexes around some I/O and common datastructures, and that that would be about it, but I'm probably wrong... Best regards, Mikael On Wed, Nov 18, 2015 at 3:16 PM, Christopher Allan Webber wrote: > Mikael Djurfeldt writes: > >> Den 4 okt 2015 02:30 skrev "Christopher Allan Webber" < >> cwebber@dustycloud.org>: >>> - This would be like asyncio or node.js, asynchronous but *not* OS >>> thread based (it's too much work to make much of Guile fit around >>> that for now) >> >> Why is this (too much work for threads)? > > Threads bring a lot of risky problems. I really don't want to deal with > that much locking. A lot of Guile's code isn't thread-safe... if we > wanted to go to the "oh yeah super safe with threads!" direction, > it might require something like Clojure's software transactional > memory. I talked to Mark Weaver about this; it's very expensive to do, > super hard to implement (I don't think we have any guile devs > interested), and makes things slower whenever you *aren't* using > threads. > > The asyncio / node.js style of things can solve IO bound problems. As > for CPU bound, we can use message passing between threads or processes. > > It's beneficial to focus on message passing for CPU bound issues anyway, > because this means that our code will be able to span across machines, > if said messages are serializable. > > Does that make sense? > - Chris