Is there any way to name a thread in the MF? Something like Thread.Name in the full size framework.
  | ||||||||||||||
Name a Thread
Started by Bernie, Jun 09 2013 06:49 PM
3 replies to this topic
#1Posted 09 June 2013 - 06:49 PM Is there any way to name a thread in the MF? Something like Thread.Name in the full size framework.
#2Posted 09 June 2013 - 07:08 PM I could be wrong, but it looks like that property doesn't exist in the MF:
http://msdn.microsof...y/hh435819.aspx
You can, of course, create a thread as a variable: var foo = new Thread(bar);foo.Start(); But that may not be what you're looking for. #3Posted 09 June 2013 - 08:56 PM I haven't been able to find one yet. But it's interesting that in Visual Studio is does show a field for name when you look in the thread window. I'm hoping that maybe someone has found a way around this. #4Posted 09 June 2013 - 09:14 PM I'm pretty sure you can not set the thread name; that it's either not available in netmf, or at best would mean changing a build option of the firmware if it is capable.
In my case, I get around it by having my worker threads emit a log message identifying themselves by id. Then at least I can correlate it in my logs. E.g. Debug.Print("XXX starting on thread: " + Thread.CurrentThread.ManagedThreadId); 0 user(s) are reading this topic0 members, 0 guests, 0 anonymous users | ||||||||||||||
|
||||||||||||||
This webpage is licensed under a Creative Commons Attribution-ShareAlike License. | ||||||||||||||