mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-06 02:30:31 -08:00
update comment in 'lib/thread-safe.lisp'
This commit is contained in:
parent
b20eed0306
commit
7b692f4e12
1 changed files with 17 additions and 9 deletions
|
|
@ -2,18 +2,26 @@
|
|||
;;; SIMPLE AND SAFE SLIME MODE
|
||||
;;; ==========================
|
||||
;;;
|
||||
;;; Loading this file before loading EQL code guarantees running EQL functions in the GUI thread.
|
||||
;;; Loading this file before calling any EQL function (involving the UI)
|
||||
;;; guarantees running EQL functions on the UI thread.
|
||||
;;;
|
||||
;;; This means that we don't need a Slime REPL-hook, making it safe to evaluate any EQL code in
|
||||
;;; Slime, both on the REPL and using 'eval-region'.
|
||||
;;; This means that we don't need a Slime REPL-hook, making it safe to evaluate
|
||||
;;; any EQL code in Slime, both on the REPL and using 'eval-region'.
|
||||
;;;
|
||||
;;; The only drawback is a little more consing for every EQL function call, but allowing to safely
|
||||
;;; call GUI functions from any ECL thread.
|
||||
;;; The only drawback is a little more consing for every EQL function call, but
|
||||
;;; allowing to safely call UI functions from any ECL thread.
|
||||
;;;
|
||||
;;; Note also that wrapping functions in QRUN* is basically the same as a direct call, if called
|
||||
;;; from the ECL main thread (GUI thread), so it will add almost no overhead.
|
||||
;;; Since most EQL function calls are driven by the Qt event loop anyway, you won't even notice
|
||||
;;; the presence of macro QRUN* (performance wise).
|
||||
;;; Note also that wrapping functions in QRUN* (like done here, see below) is
|
||||
;;; basically the same as a direct call, if called from the ECL main thread (UI
|
||||
;;; thread), so it will add almost no overhead. Since most EQL function calls
|
||||
;;; are driven by the Qt event loop anyway, you won't even notice the presence
|
||||
;;; of macro QRUN* (performance wise).
|
||||
;;;
|
||||
;;; N.B: If you want to start/run EQL in a thread (other than the UI one), you
|
||||
;;; just need to add this file to your project. Note that any EQL function call
|
||||
;;; will now do a thread switch internally, so you may experience (much) slower
|
||||
;;; execution. See also comment in 'examples/X-extras/primes-thread.lisp' about
|
||||
;;; manually wrapping repeated calls in macro QRUN*.
|
||||
;;;
|
||||
|
||||
(in-package :eql)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue