Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; race condition & global variable
- Global Dim someArray.i(1000)
- Global i
- Procedure fillArray(number.i)
- For i = 0 To ArraySize(someArray())
- someArray(i) = number*1000000
- Next
- EndProcedure
- CreateThread(@fillArray(),0)
- CreateThread(@fillArray(),1)
- CreateThread(@fillArray(),2)
- CreateThread(@fillArray(),3)
- CreateThread(@fillArray(),4)
- CreateThread(@fillArray(),5)
- Delay(100)
- For i = 0 To ArraySize(someArray())
- Debug someArray(i)
- Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement