Guest User

Untitled

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