CreateThread() optional flag

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

CreateThread() optional flag

Post by nco2k »

a flag to decide, whether or not the thread should be executed right away.

Code: Select all

Thread = CreateThread(@Proc(), 0, 1); flag=1 will pause the thread from the beginning
;...
;do stuff
;...
ResumeThread(Thread); now lets start that thread
and could you make the param value optional? most of the time we use zero anyway.

Code: Select all

CreateThread(@Proc(), Param=0, Flag=0)
c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf