From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Allan Webber Newsgroups: gmane.lisp.guile.devel Subject: Re: Asynchronous event loop brainstorm at FSF 30 Date: Wed, 18 Nov 2015 08:16:17 -0600 Message-ID: <87h9kj5q7g.fsf@dustycloud.org> References: <87k2r3tvzh.fsf@dustycloud.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447857445 22446 80.91.229.3 (18 Nov 2015 14:37:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Nov 2015 14:37:25 +0000 (UTC) Cc: guile-devel To: mikael@djurfeldt.com Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Nov 18 15:37:21 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 1Zz3rL-0007Eg-PW for guile-devel@m.gmane.org; Wed, 18 Nov 2015 15:37:19 +0100 Original-Received: from localhost ([::1]:36322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz3rL-0004xH-4M for guile-devel@m.gmane.org; Wed, 18 Nov 2015 09:37:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz3rI-0004wx-0p for guile-devel@gnu.org; Wed, 18 Nov 2015 09:37:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zz3rG-0008IZ-SE for guile-devel@gnu.org; Wed, 18 Nov 2015 09:37:15 -0500 Original-Received: from dustycloud.org ([2600:3c02::f03c:91ff:feae:cb51]:47483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz3rG-0008IQ-Nn for guile-devel@gnu.org; Wed, 18 Nov 2015 09:37:14 -0500 Original-Received: from earlgrey (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 6E14A267DD; Wed, 18 Nov 2015 09:37:13 -0500 (EST) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c02::f03c:91ff:feae:cb51 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:18039 Archived-At: 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