CF background threads and CF #ifdef's

  • Thread starter Thread starter Chris Tacke, eMVP
  • Start date Start date
C

Chris Tacke, eMVP

There are no pre-processor symbols for it, since the build environment has
no way to know what the resulting binary will run on. You can use
ystem.Environment.OSVersion.Platform to determine if you're under CE or not.
 
Well, it has some idea of my intentions -- if I'm compiling a CF project,
the devenv knows that certain classes/methods/properties are missing in the
target environment and will provide compile-time errors --
so it would seem that there should be something at compile-time that let's
me
know what the intended "maximum" target is. But, no biggie, I can define my
own symbols.

The threading issue??

thanks
 
I notice that the CF doesn't include the IsBackground property for threads.
Does this mean that all threads are foreground threads meaning their
continued execution will keep the process from exiting?
(I'd like to have both behaviors available.) What about threads created by
ThreadPool? -- the docs say these are "worker threads" but if there's no way
to set the "daemon" staus of the thread...

Also, what are the pre-processor symbols I should use for checking for
CF/PPC vs. the desktop??
(On my continuing quest to get the same apps and libs working on both...)

thanks
 
Threads created by the the Thread class will keep the process running.
Threads created on the thread pool will not keep the process running.

Jim
 

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

Similar Threads


Back
Top