PC Review


Reply
Thread Tools Rate Thread

CF background threads and CF #ifdef's

 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      20th Nov 2003
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.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


"MBR" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      20th Nov 2003
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

"Chris Tacke, eMVP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
> --
> Chris Tacke, eMVP
> Co-Founder and Advisory Board Member
> www.OpenNETCF.org
> ---
> Windows CE Product Manager
> Applied Data Systems
> www.applieddata.net
>
>
> "MBR" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
MBR
Guest
Posts: n/a
 
      20th Nov 2003
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


 
Reply With Quote
 
Jim Wilson
Guest
Posts: n/a
 
      21st Nov 2003
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

"MBR" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find the threads running in background Senthil Microsoft C# .NET 4 10th Aug 2005 03:31 PM
Forcing ThreadPool threads to act like they are not background threads orekin Microsoft C# .NET 13 2nd May 2005 07:15 AM
ASP.NET and background threads Paul Hatcher Microsoft ASP .NET 2 26th Jan 2005 02:35 PM
.NET background threads =?Utf-8?B?cGF0dHlAZ2Q=?= Microsoft Dot NET 1 14th Oct 2004 02:25 PM
Background Threads, BeginInvoke, etc... Gomaw Beoyr Microsoft C# .NET 0 23rd Aug 2003 02:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:25 PM.