Hi,
I need to create chart programmatically in multiple threads at a same time.
How can I achieve this?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
soniya srinivasanPosted Aug 21, 2015, 3:10 AM
Sumit JoshiPosted Aug 21, 2015, 2:51 AM
Each thread has a separate call stack, so yes they can both be using the same method on the same object. And indeed, if needed each thread can (via recursion) call the same method on the same instance multiple times if you really want.
However, what might trip you up is if you are using state in that object (instance or static fields, etc, and anything related from that state). You will need to ensure your access to any shared state gives full consideration (and presumably synchronisation) to multi-threaded access.
If helpful mark as Correct Answersoniya srinivasanPosted Aug 21, 2015, 2:44 AM
Vaikesh K PPosted Aug 21, 2015, 2:37 AM
Refer these links :
1) https://msdn.microsoft.com/en-us/library/vstudio/hh297119(v=vs.100).aspx
Sumit JoshiPosted Aug 21, 2015, 2:35 AM
If helpful mark as Correct Answer