How do you wait on a thread to finish without using Join?

J

Jim H

I need to make sure a worker thread has completed before I can let my app
close. In System.Threading.Thread there is Join(). That isn't supported by
the cf. How do I know when it's safe to close my app? Is there some kind
of wait I can perform on the thread object?

Thanks,
jim
 
A

Alex Feinman [MVP]

Set a flag (or an event ) before exiting the thread and wait on it in the
main thread before exiting the app
 
J

Jim H

Is the OpenNETCF code supported on the desktop? Can I use dlls with
OpenNETCF code in desktop apps?

I checked looked around on the site but didn't see anything one way or the
other.

Jim
 
P

Paul G. Tobey [eMVP]

That depends, of course, on whether you are using classes that P/Invoke to
WinCE-only APIs...

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top