LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

resource tracking window: thread ID

Solved!
Go to solution

sorry, me again:

 

Using the resource tracking window, displaying the thread IDs, I have four entries: two have thread function IDs 1 and 2, my secondary threads, one is the primary thread, but then there is a forth listed there, and instead of a fucntion name it says source not available. Is this CVI itself or some thread that escaped my attention?

 

Thanks, Wolfgang

0 Kudos
Message 1 of 6
(4,105 Views)
Hm, I am afraid that NI is busy with shipping CVI 9.0.1, so allow me to bring this question up again 🙂
Message Edited by Wolfgang on 05-11-2009 03:44 AM
0 Kudos
Message 2 of 6
(4,072 Views)

Hello Wolfgang,

 

The short answer is that I don't know why you are seeing a "source not available" entry.

 

Each entry in the resource tracking window should correspond to an individual resource that you've allocated, not to a thread function. Although it's possible to show the thread ID in which each resource was allocated, you shouldn't expect to have one entry per thread, unless you've allocated exactly one resource in each thread.

 

I'm attaching a screenshot of what I see when I allocate some resources in a very basic multithreaded program. Can you send us a screenshot too, so that we can compare?

 

Luis

0 Kudos
Message 3 of 6
(4,051 Views)

Hi Luis,

 

Thanks for taking care. I did not manage to include my screenshot in my message, so I'll attach it.

 

Wolfgang

0 Kudos
Message 4 of 6
(4,041 Views)
Solution
Accepted by topic author Wolfgang

Ah, that is the Threads window, not the Resource Tracking window. The Threads window shows you all the threads that are running in your process, which are not necessarily only the threads that you know about. Many drivers and other 3rd party libraries create their own threads in order to perform some tasks, and the CVI debugger will show them in this window. Normally, you won't have to worry at all about these threads, since they are not executing your code (hence the "source not available" designation).

 

If you're curious and would like to know what component of your program is creating those threads, you can probably find out by placing breakpoints at several points of your program and then checking the Threads window when each of those breakpoints is hit, to see when that thread appears. With a little bit of patience, you should be able to narrow it down to a single function call in your program. But unless you're having some other problem and you suspect that the existence of this thread is playing a role, you can simply ignore this thread.

 

Luis

0 Kudos
Message 5 of 6
(4,002 Views)

Hi Luis,

 

Thanks a lot for the explanations!

 

Wolfgang

0 Kudos
Message 6 of 6
(3,996 Views)