emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs Mac port


From: YAMAMOTO Mitsuharu
Subject: Re: Emacs Mac port
Date: Thu, 12 Oct 2017 17:12:17 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shij┼Ź) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

The bare development branch of the Mac port is now based on Emacs
26.0.90 pretest:

  https://bitbucket.org/mituharu/emacs-mac.git

The branch name is "work".  It should be considered as
experimental/hackers-only.

At the moment, the new frame parameters `parent-frame' and
`undecorated' are not supported yet.  I have some premature code
internally, but not included in the repository above.

In order to support concurrency on Emacs 26 properly, I've redesigned
the `select' emulation code.  It runs the Lisp REPL in a non-main
thread, so the main thread is dedicated to GUI tasks, which might be
requested from multiple Lisp threads.  The GUI and Lisp threads run
mostly cooperatively (i.e., do not run simultaneously) except in the
`select' emulation.  Note that the variable `main_thread_id' in
sysdep.c no longer corresponds to the "main thread" in a usual sense.

Thanks to this new design, all the following examples can work without
hang or crash:

  (make-thread
   (lambda ()
     (let (last-nonmenu-event)
       (setq test (y-or-n-p-with-timeout "test" 2 'timeout)))))

  (make-thread 'buffer-menu-open)

  (make-thread
   (lambda ()
     (let (last-nonmenu-event)
       (call-interactively 'find-file))))

  (make-thread
   (lambda ()
     (setq test (x-select-font))))

In addition to the usual configure options for debugging, I'd
recommend using "the Main Thread Checker" introduced in Xcode 9 by
setting the environment variable DYLD_INSERT_LIBRARIES to

  /Applications/Xcode.app/Contents/Developer/usr/lib/libMainThreadChecker.dylib

If you are using lldb, then you can set it as follows:

  (lldb) settings set target.env-vars 
DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/usr/lib/libMainThreadChecker.dylib
 

                                     YAMAMOTO Mitsuharu
                                address@hidden



reply via email to

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