NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

get number of threads

Hi

 

I'm trying to build a customize operator interface in c#

 

Is there away to get the threads number in a sequence dynamically(during runstate) via API

 

 and if so how?

 

 

Thanks

 

Assi

0 Kudos
Message 1 of 8
(4,147 Views)

Hi,

 

You can try Execution.NumThreads

 

Syntax

Execution.NumThreads

Data Type

Long

Purpose

Returns the current number of threads in the execution.

Remarks

Do not access this property when handling a UIMsg_Trace message. TestStand allows non-foreground threads to run and complete while TestStand handles trace events. As a result, getting the number of threads is unreliable during trace event handling.

 

 

 

Regards
Ray Farmer
0 Kudos
Message 2 of 8
(4,143 Views)

Is  there a limitation in the number of threads that can be generated by teststand?

br

 

0 Kudos
Message 3 of 8
(4,078 Views)

There is no hardcoded limit, but the OS and available resources likley have a practical limit.

 

-Doug

0 Kudos
Message 4 of 8
(4,068 Views)

Thanks for the fast reply.

We are trying to runn more than 100 Threads in parallel and run in trouble with that. But we are not shure if it is thread related.

What are your expirences with the practical max numbers of threads?

0 Kudos
Message 5 of 8
(4,061 Views)

What sort of problems are you have, can you give examples?

Regards
Ray Farmer
0 Kudos
Message 6 of 8
(4,058 Views)

If you have 100 threads, but 90 of them are generally suspended at any given time then it's ok, but if you are really trying to do 100 things in parallel it's very likely you will run into performance problems. The short answer is, it depends on what those threads are doing.

 

Hope this helps,

-Doug

0 Kudos
Message 7 of 8
(4,052 Views)

Thanks, this information helps.

0 Kudos
Message 8 of 8
(4,050 Views)