Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Concurrent-computing/Prolog/concurrent-computing.pro
Normal file
12
Task/Concurrent-computing/Prolog/concurrent-computing.pro
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
main :-
|
||||
thread_create(say("Enjoy"),A,[]),
|
||||
thread_create(say("Rosetta"),B,[]),
|
||||
thread_create(say("Code"),C,[]),
|
||||
thread_join(A,_),
|
||||
thread_join(B,_),
|
||||
thread_join(C,_).
|
||||
|
||||
say(Message) :-
|
||||
Delay is random_float,
|
||||
sleep(Delay),
|
||||
writeln(Message).
|
||||
Loading…
Add table
Add a link
Reference in a new issue