I've been brainstorming ways to measure UI thread utilization, and it looks like I can possibly back my into it by looping through the ProcessThreads for the current process and then trying to figure out which one the UI is on.
Is there any structured way to go from a m开发者_如何学编程anaged thread ID to a process thread ID? Generally this is a bad idea because if your managed thread is recycled it could end up on a different process thread, but AFAIK, that can't happen with the UI thread. While the UI is running, that UI managed thread is going to map to the same process thread ID.
精彩评论