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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sumit JoshiRank #1,252 · 1.4K reputationPosted Aug 20, 2015, 10:35 PM EDT
Vaikesh K PRank #808 · 2.8K reputationPosted Aug 20, 2015, 10:37 PM EDT
Refer these links :
1) https://msdn.microsoft.com/en-us/library/vstudio/hh297119(v=vs.100).aspx
soniya srinivasan5 reputationPosted Aug 20, 2015, 10:44 PM EDT
Sumit JoshiRank #1,252 · 1.4K reputationPosted Aug 20, 2015, 10:51 PM EDT
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.
soniya srinivasan5 reputationPosted Aug 20, 2015, 11:10 PM EDT