Concurrent computing: Difference between revisions

Line 1,811:
(lambda () (print "Rosetta"))
(lambda () (print "Code")))</lang>
 
If your implementation doesn't provide parallel-execute, it can be implemented with [https://srfi.schemers.org/srfi-18/srfi-18.html SRFI-18].
<lang scheme>(import (srfi 18))
(define (parallel-execute . thunks)
(let ((threads (map make-thread thunks)))
(for-each thread-start! threads)
(for-each thread-join! threads)))</lang>
 
=={{header|Sidef}}==
1

edit