Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 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