On Tue, May 02, 2023 at 12:15:14AM +0200, Emanuel Berg wrote: > tomas wrote: > > >> maybe show us some simplest implementation "hello world" [...] > > > > (defun hello-world () > > (message "Hello, World")) > > > > Happy now? > > No, since that should just execute sequentially and monopolize > the Emacs process if I am correct? [...] Your request is far too unspecific as to allow a meaningful answer. What do you mean by a "thread"? What do you expect "parallel" to do"? How do your programs look like? Do you want multiprocessing with explicit continuation passing or with pseudo- or real parallelism with locking around commonly shared resources? Or do rather message passing without any shared resources? "Threads" is not just some kind of magical dust you sprinkle over your program to make it execute in parallel, alas. For one extreme of the spectrum, making a program responsive while waiting for data to trickle in via several network sockets doesn't need any threads (arguably, threads can make it worse, as web server folks have proven). On the other extreme, you might want to distribute a big parallelizable work to your 40 CPU cores (I only have 2, alas). Most of the time,you'd be better of with many processes. Life takes place somewhere in between that (unless you are either working with big clusters, or with GPUs). My take is that threads are a bit overrated. But I may be wrong. Cheers -- t