Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Christof's Multithreading Visual FoxPro
Message
From
26/10/2006 22:12:53
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164643
Message ID:
01164891
Views:
13
In Christof's sample code http://my.advisor.com/doc/18238, how do you determine when the background thread is finished?
See bottom of this code...
* Christof's sample code
Declare Long CreateThreadWithObject in DMult.DLL ;
   String lpszClass, ;
   String lpszMethod, ;
   Object oRef,  ;
   Long @lpdwThreadId 
Declare CloseHandle in Win32API LONG
Local lnHandle, lnThreadID
lnThreadID = 0
lnHandle = CreateThreadWithObject( ;
   Strconv("sample.Server"+Chr(0),5), ;
   Strconv("Main"+Chr(0),5), ;
   _VFP, ;
   @lnThreadID ;
)
CloseHandle(m.lnHandle)

* How to do this:
do while .t.
 If background_thread_finished
 wait window 'background thread is finished'
 exit
 endif
enddo
Cyril
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform