Trying to use multithreading with Winforms. Could not find any good documentation or sample.
Sketchy documentation says Set ThreadingMode to Multithreaded and use lock pattern. How to Lock pattern?
Multithreading with Winforms
Hi Avinash,
You can easily use the Multithreaded mode like this:
winformsMap1.ThreadingMode = MapThreadingMode.Multithreaded;
Wish that’s helpful.
Regards,
Ethan
Thanks Ethan,
I’ve tried the most obvious way as you have mentioned. Unfortunately my map goes blank if ThreadingMode is set to multithreaded. (I’m using countries shapefile). Map shows background brush only.
I must be missing something beyond setting threadingmode, and I’m trying to figure it out. Point me to any documentation to the same or sample code if possible.
Hi Avinash,
Please view this sample wform1.zip (102.6 KB), it looks the ThreadingMode API works well.
If you still have any problem please let us know.
Regards,
Ethan
Ethan,
Thanks for sample. It worked as you have mentioned but only after Adding Mapsuite Barebone package. I was using Desktop.Standard only as it suited my requirement.
Against my expectations speed as degraded after enabling multithredmode. Any Comments?
Hope someone maintains proper documentation.Posting on forum and waiting for answer doesn’t seem to be a good idea considering Timezone difference.
Hi Avinash,
I replaced the package from Barebone to Standard, it still works well in my side.
8683_2.zip (104.7 KB)
If the sample still don’t works for you, please upload your sample and we can look into this.
Most of our documents are in our wiki page: wiki.thinkgeo.com, the samples can be found in github.com/thinkgeo. If you met a problem you can also search in forum to similar questions or directly submit your problem in ticket.
Wish that’s helpful.
Any question please feel free to let us know.
Regards,
Ethan