unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Lisp object allocations during asynchronous input handling
@ 2005-11-28  2:34 YAMAMOTO Mitsuharu
  2005-12-11  1:48 ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 3+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-11-28  2:34 UTC (permalink / raw)


Forgive me if this issue has already been discussed.

A comment in src/termhooks.h says:

  /* Additional event argument.  This is used for TOOL_BAR_EVENTs and
     HELP_EVENTs and avoids calling Fcons during signal handling.  */
  Lisp_Object arg;

According to this, allocating Lisp objects during asynchronous input
handling seems to be evil.  Actually they operate on global variables
and thus not reentrant.  (Correct me if I'm wrong.)

However, drag-and-drop handling functions on any window systems (e.g.,
x_handle_dnd_message in xselect.c) are doing this kind of allocations
in order to cope with multiple dnd items.  And I can find other such
places in the Carbon port.  Actually, I made some of them without
noticing this issue.

So, my question is: should we make an effort to eliminate such parts
now?  I'm not sure how much they cause real problems.  And if
SYNC_INPUT will be defined in future, we won't need to worry about
such kind of allocations.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-11 16:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-28  2:34 Lisp object allocations during asynchronous input handling YAMAMOTO Mitsuharu
2005-12-11  1:48 ` YAMAMOTO Mitsuharu
2005-12-11 16:49   ` Richard M. Stallman

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