diff -u /home/albinus/tmp/test.el.\~1\~ /home/albinus/tmp/test.el --- /home/albinus/tmp/test.el.~1~ 2018-10-16 14:46:47.000000000 +0200 +++ /home/albinus/tmp/test.el 2018-10-16 15:47:05.581276541 +0200 @@ -19,9 +19,9 @@ (defun test-slave () "Create an asynchronous process and wait for it to exit." (let ((proc (make-process - :name "test" + :name (thread-name (current-thread)) :buffer (generate-new-buffer " *test*") - :command '("wget" "-qO-" "https://en.wikipedia.org/wiki/Emacs") + :command `("echo" ,(thread-name (current-thread))) :connection-type 'pipe :sentinel #'test-sentinel))) (while (eq (process-status proc) 'run) @@ -32,10 +32,10 @@ "Successively run `test-slave'. With non-nil ASYNC, use a new thread for each invocation." (if async - (dotimes (_ 2) + (dotimes (i 100) (let (threads) - (dotimes (i 2) - (push (make-thread #'test-slave (format "test-%d" i)) threads)) + (dotimes (j 100) + (push (make-thread #'test-slave (format "test-%d-%d" i j)) threads)) (mapc #'thread-join threads))) (dotimes (_ 2) (test-slave))))