If MyThread is still executing while PBMAIN is ending, does MyThread do anything?
Is it bad form to not wait for all threads to complete?
Is it bad form to not wait for all threads to complete?
Code:
#include "win32api.inc" FUNCTION PBMAIN () AS LONG THREAD CREATE MyThread(x???) TO h??? SLEEP 50 IF h??? = 0 THEN ? "Error creating thread":EXIT FUNCTION REM WaitForSingleObject h???, %INFINITE REM DO:SLEEP 250:LOOP WHILE THREADCOUNT > 1 THREAD CLOSE h??? TO result??? 'required END FUNCTION THREAD FUNCTION MyThread(BYVAL x???) AS DWORD SLEEP 1000 'Does this do anything? BEEP 'NO BEEP SLEEP 1000 END FUNCTION
Comment