Jump to content


Threading WinCE4 Question

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Stoned_Krusty

Stoned_Krusty

    Newbie

  • Members
  • Pip
  • 11 posts
Under the .NET framework, there is the Threading namespace, this contains a number of classes, including the Thraed class. Now, under the windows implementation, this class supports the method - Abort().

This method does not seem to exist in the windows CE implementation, is this true? If so, how do you terminate a thread at will?

Any help here would be appreciated, im porting an IRC library to my SPVE200 and writting a nice IRC client :)

Thanks,

Krusty

[Edit] Would setting the thread to null call Thread.Dispose()? and would that in tern terminate the thread in an orderly fashion?


#2
bdmoore

bdmoore

    Task for the day: Think of interesting entry for here....

  • Members
  • PipPipPip
  • 196 posts
  • Gender:Male
  • Location:Swindon, UK
  • Devices:Touch Diamond, i780, TyTN II
Stoned_Krusty,

The Compact Framework doesn't support stopping or aborting threads unfortunately.

Setting the thread to null would not be advisable.  One possible solution would be to have a class level variable (just a bool would do) that you could set when you want to stop the thread, and have the thread periodically check it and shut itself down if required.

HTH :)

bdmoore


#3
Stoned_Krusty

Stoned_Krusty

    Newbie

  • Members
  • Pip
  • 11 posts
Cheers, I managed to get it all working anyway, will post some screenshots soon if anyone is interested, and the IRC lib (excluding the DCC Classes) has been ported and is working so far!

Watch this space for SPVIRC! :)

Thanks again!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users