emacs-devel
[Top][All Lists]
Advanced

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

Re: Callbacks from modules


From: Philipp Stephani
Subject: Re: Callbacks from modules
Date: Thu, 26 Nov 2015 18:44:47 +0000



Eli Zaretskii <address@hidden> schrieb am Do., 26. Nov. 2015 um 19:41 Uhr:
> From: Philipp Stephani <address@hidden>
> Date: Thu, 26 Nov 2015 18:16:13 +0000
> Cc: Eli Zaretskii <address@hidden>, Daniel Colascione <address@hidden>
>
> There are two major issues with allowing callbacks at arbitrary times, which
> need to be discussed and resolved first. The first is that such a facility
> would change the execution model of Emacs in a quite fundamental way. Right now
> all user-defined code inside the Emacs process gets run through a path under
> the control of Emacs, either as a response to an input event, or a timer, or a
> process filter etc. Adding a facility to run module code from arbitrary
> callbacks would remove this invariant, which can have global effects on Emacs.

I don't even understand what is meant by "arbitrary callbacks".  If
they are called in the context of a separate thread, we will not allow
them to run.

Yes, but there are other possibilities. For example, modules can create additional windows in the main thread and install windows procedures pointing to them. Such window procedures currently cannot communicate with Emacs.
 

IOW, such arbitrary callbacks need to run in the C land, and
communicate with Lisp via timers.  In the future, we might add
facilities that would allow a module register a file descriptor
through which events could flow into the Emacs event queue.  But that
is not yet available, and I'm not sure we'd want to allow it.


I agree. 

reply via email to

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