[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 03/10] introduce systhread layer

From: Stefan Monnier
Subject: Re: [PATCH 03/10] introduce systhread layer
Date: Mon, 13 Aug 2012 09:21:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

>>> 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.


>> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]