Task

Using either native language concurrency syntax or freely available libraries, write a program to display the strings "Enjoy" "Rosetta" "Code", one string per line, in random order.

Concurrency syntax must use threads, tasks, co-routines, or whatever concurrency is called in your language.




 
(lib 'tasks) ;; use the tasks library
 
(define (tprint line ) ;; task definition
		(writeln _TASK  line) 
		#f )
 
(for-each  task-run ;; run three // tasks
      (map (curry make-task tprint) '(Enjoy Rosetta code )))
 
   →
   #task:id:66:running     Rosetta    
   #task:id:67:running     code    
   #task:id:65:running     Enjoy 
 