Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
Global mutex = CreateMutex()
|
||||
|
||||
Procedure Printer(*str)
|
||||
LockMutex(mutex)
|
||||
PrintN( PeekS(*str) )
|
||||
UnlockMutex(mutex)
|
||||
EndProcedure
|
||||
|
||||
If OpenConsole()
|
||||
LockMutex(mutex)
|
||||
thread1 = CreateThread(@Printer(), @"Enjoy")
|
||||
thread2 = CreateThread(@Printer(), @"Rosetta")
|
||||
thread3 = CreateThread(@Printer(), @"Code")
|
||||
UnlockMutex(mutex)
|
||||
|
||||
WaitThread(thread1)
|
||||
WaitThread(thread2)
|
||||
WaitThread(thread3)
|
||||
|
||||
Print(#CRLF$ + #CRLF$ + "Press ENTER to exit")
|
||||
Input()
|
||||
|
||||
CloseConsole()
|
||||
EndIf
|
||||
|
||||
FreeMutex(mutex)
|
||||
Loading…
Add table
Add a link
Reference in a new issue