emacs-devel
[Top][All Lists]
Advanced

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

Re: What's the problem?


From: Stefan Monnier
Subject: Re: What's the problem?
Date: 11 Dec 2003 09:12:17 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> or every 100 iterations, or something like that.  In a cooperative
> multi-tasking system, you'd just stick in a (yield) or something, but in
> emacs this would be very hard to support.

I don't see why this should be so hard.
What we're talking about is basically multiple-stacks, context-switches
done only from Feval (i.e. at elisp granularity so there's no concurrency
in the C code), some form of elisp forking and locking primitives (I
suggested to lock a buffer at a time, but we also need to prevent
context-switches during special cases such as jit-lock), and a lot
of experimenting.

One case I recently bumped into where using the current event-driven
functionality is not possible (even for I/O) is in Tramp where the wait can
easily be on the order of a minute for the initial connection.  In a case
like this one, I think the thread creation primitive needed would be
something akin to the shell's "C-z + bg".  Maybe something like
(if (fork) (throw 'toplevel) ...) if a `fork' like primitive makes sense,
or just a new primitive `make-new-toplevel-thread'.


        Stefan




reply via email to

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