Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Lamp
Beginner
79 Views

Graph.Execute() got stuck when work with multi-thread.

Hi,

I have a block of code using DMIP:

Graph graph;
....
....
graph.Execute();

If only start a single thread, we can execute this block of code without any problem; but if we start two threads, then one of them will get stuck at "graph.Execute()", seems it will never return.

where is the problem?

Regards,
Xie
0 Kudos
4 Replies
Vladimir_Dudnik
Employee
79 Views

Hi Xie,

I do not think there is a problem, we keep threads in DMIP in sleep state when they are not active in order to faster resume when it needed.

Do you see performance improvement on two threads?

Regards,
Vladimir
Lamp
Beginner
79 Views

Hi Vladimir,


The scenario is, I have several threads, like 20, if the threads access the DMIP code block one by one, it works perfect; now I want to speed up the process, so I update the semaphore, to allow two threads can access the DMIP code block at the same time,after all threads been executed,one thread stopped at "Graph.Execute" method, I don't understand why it stopped.

The expected result is all threads can complete sucessfully, now one thread never return and I cannot get the result.

Regards,
Xie
Vladimir_Dudnik
Employee
79 Views

Hi Xie,

it seems to be difficult to answer this question without some test case. Is it possible for you to provide test which reproduce that issue?

Note, you can post test case in private message if there is concern on exposing your code to public. (Just check Make this post private button on the bottom of editor window.

Regards,
Vladimir
Lamp
Beginner
79 Views

Hi Vladimir,

please check my previous post for some code sample.

Regards,
Xie
Reply