Debgugging application with AsyncOperations
-
Hey, When I run a worker thread via an async operation, it get named 'Worker Thread', which forces me to go identify the threads by looking at some id value every time. Is there a way to make an AsyncOperation run on a named worker thread? Cheers
Jeroen De Dauw --- Forums ; Blog ; Wiki --- 70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
-
Hey, When I run a worker thread via an async operation, it get named 'Worker Thread', which forces me to go identify the threads by looking at some id value every time. Is there a way to make an AsyncOperation run on a named worker thread? Cheers
Jeroen De Dauw --- Forums ; Blog ; Wiki --- 70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
jeroen de dauw wrote:
When I run a worker thread via an async operation, it get named 'Worker Thread', which forces me to go identify the threads by looking at some id value every time. Is there a way to make an AsyncOperation run on a named worker thread?
It's a bit sealed, and there's no
Tag
property that you could abuse. The best I can think of would be a Hashtable or a Dictionary, perhaps using an extension-method to make the lookup somewhat easier.I are Troll :suss:
-
Hey, When I run a worker thread via an async operation, it get named 'Worker Thread', which forces me to go identify the threads by looking at some id value every time. Is there a way to make an AsyncOperation run on a named worker thread? Cheers
Jeroen De Dauw --- Forums ; Blog ; Wiki --- 70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
I have looked high and low trying to name .NET threads, and came up with nothing. My logging tends to show a 2-hex-digit managed thread ID (except " " for the main tread), that's the best I have; the only alternative I see is with a map, say a Dictionary<int,string> as Eddy suggested. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Merry Christmas and a Happy New Year to all.