Skip to content
0:00 / 0:00

#emacs#multithreading#elisp

Multithreaded Emacs

dickmao

961 subscribers • 4 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.

Advanced. Deep dive for people who know the field.

3.6K views2 years ago1 recommendation

Systems programmingTools and practiceVim, Emacs and editorsConcurrency and parallelism

A short demonstration of running multithreaded Emacs in batch mode to factor numbers.

\# EMACS=src/emacs bash factor.sh {nthreads} {multi} EMACS=${EMACS:-src/emacs} NTHREADS=${1:-1} MULTI=${2:-nil} time ${EMACS} -q --batch -l cl-lib \ --eval "(dotimes (k ${NTHREADS}) (make-thread (lambda () (cl-loop with n = 249597825381677 for divisor from 2 upto (truncate (sqrt n)) when (zerop (% n divisor)) return (princ (format \"t%d %d = %d(%d)\n\" k n divisor (/ n divisor))))) nil ${MULTI}))" \ --eval "(while (&gt (length (all-threads)) 1) (sleep-for 1))" "Chinese Young business man" by WageIndicator.org - Pictures from Paulien Osse and is licensed under CC BY 2.0.

Why it's here

1 person recommends this

u/pwnedaryGNU Emacsin r/emacs • Recommends

Multithreaded Emacs