Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

slow performance of interop word object when it is used in threads

$
0
0
I have a method in my application where we use interop word object and few operations are included with this interop word object. I am trying to call this method in a separate thread to improve the performance of our application. But my thread is taking longer time to complete than actual time required to complete it. Can any one suggest me what is the issue.

public void method()
{
public void InteropObjectOperation()
{

}
}

----> after using thread

public void method()
{

Thread thread=new Thread(()=> InteropObjectOperation())
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
}

public void InteropObjectOperation()
{

}


Why thread is taking longer time to complete than the actual time it took to complete when it is not operated in thread.

Viewing all articles
Browse latest Browse all 4350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>