Advertisement
Guest User

Untitled

a guest
Dec 5th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sub threadProcedure( byval userdata as any ptr )
  2.     for i as integer = 0 to 4
  3.         print i
  4.         sleep 100, 1
  5.         Shell "ls"
  6.     next
  7. end sub
  8.  
  9. print "starting thread..."
  10. dim as any ptr threadid = threadcreate( @threadProcedure, 0 )
  11.  
  12. print "waiting for thread to finish..."
  13. threadwait( threadid )
  14.  
  15. print "finished"
  16. sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement