unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ken Raeburn <raeburn@raeburn.org>
Cc: Tom Tromey <tromey@redhat.com>,
	Daniel Colascione <dancol@dancol.org>,
	Emacs discussions <emacs-devel@gnu.org>
Subject: Re: [PATCH 03/10] introduce systhread layer
Date: Mon, 13 Aug 2012 09:21:30 -0400	[thread overview]
Message-ID: <jwv4no72axp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <9C928EA6-6467-422C-842B-9EA7E37C2A91@raeburn.org> (Ken Raeburn's message of "Mon, 13 Aug 2012 06:21:24 -0400")

>>> I'd also like to do a "no threads" port that will turn most things
>>> into no-ops, and have thread-creation fail.  I was thinking perhaps
>>> I'd make a future (provide 'threads) conditional on threads actually
>>> working.  Thoughts on this?
> Unless there's a platform where the support isn't possible, I'd suggest not
> doing this last bit, so that Emacs code (both Lisp and C) can assume threads
> are available.

Agreed.

>> like GNU Pth or Windows fibers in order to avoid OS-level context
>> switch overhead.

Thread-switching performance won't be good until we can get rid of the
unwind&rewind of the let-bindings-stack, so "avoid OS-level context
switch overhead" won't bring us any measurable benefit, I think.

> Where every I/O operation needs to be rewritten to call some helper function
> that do the thread switching?

No: for the foreseeable future, the concurrency won't provide any
parallelism at all, so thread-switching will only happen at those few
points were we already allow async operations (sit-for,
accept-process-output and a few more).  So there's no need to make wrap
all I/O operations.


        Stefan



  reply	other threads:[~2012-08-13 13:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 19:38 [PATCH 03/10] introduce systhread layer Tom Tromey
2012-08-10  1:39 ` Daniel Colascione
2012-08-13 10:21   ` Ken Raeburn
2012-08-13 13:21     ` Stefan Monnier [this message]
2012-08-13 14:22     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4no72axp.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    --cc=raeburn@raeburn.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).