[Top][All Lists]

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

Re: making software with Emacs and Elisp

From: Pascal J. Bourguignon
Subject: Re: making software with Emacs and Elisp
Date: Fri, 25 Oct 2013 00:34:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <address@hidden> writes:

> "Pascal J. Bourguignon" <address@hidden> writes:
>> If you want to run processes in the outer system you
>> can call start-process amongst a few other functions.
> No, I meant "Emacs processes" but you answered that with
> `run-with-idle-timer', I guess.
>> But you can have code scheduled to run in emacs.  It
>> is not a preemptive system, but a collaborative one,
>> where each task must release the CPU quickly enough
>> for the rest of the system to stay responsive.  But a
>> lot of tasks are scheduled this way in emacs
>> (eg. background font-locking, semantic incremental
>> parses, etc). See: run-with-idle-timer
> OK, so there is one *main* Emacs process running, 

Yes, call it the "kernel".

> that might turn *idle*, I guess if you don't do anything, and
> when that happens, some Emacs arbitrator looks in a pool
> of background tasks that would be beneficial if they
> were run, and then runs them, and then when you start to
> do something again, the main Emacs process does *not*
> preempt those background tasks, instead they are run to
> completion, and it is assumed you (the user) won't
> notice, as they should be so fast anyway?


But actually the kernel only does that, manage the hardware to find the
next event, and process that event thru keymaps to find the function to
call.   When it has no event it calls the functions from the idle timer
queue.  You can consider the command bound to keys as outside of the
kernel, since you can change them easily and dynamically.  You cannot
change easily the event loop of the kernel.

Of course, the emacs system is not architectured like a unix system.

__Pascal Bourguignon__

reply via email to

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