MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




is Mappoint thread safe

This is a discussion on is Mappoint thread safe within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I'm using mappoint (the object model) for a very lengthy operation and like to do it in a background ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-05-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
is Mappoint thread safe

Hi,

I'm using mappoint (the object model) for a very lengthy operation and like to do it in a background thread. The map is not visible as whell as no other part of the ojbect. Some has done this before or know some special behave I should be aware off ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 04-05-2005
Junior Member
Yellow Belt
 
Join Date: Feb 2005
Posts: 19
I'm changing symbols, shapes etc. of the map from differend threads.
I've not found unexpected behavior so far, but that is no guarantee offcourse.

I think MapPoint works as follows:
when you update a property (eg. the location property) an event is raised,
and catched by the mappoint engine (that has its own thread) and reponds with an updated pushpin location.

but as said, I'm not sure.

succes with your application
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 04-05-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Hi,

Thanks for reply. I will give feedback when I do the threaded thing (probably in a few day)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 04-06-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 893
Blog Entries: 10
I think Jeurink is along the right lines. If you're telling MapPoint to do things from an external application, then your call will always be in a different thread. So it probably doesn't matter - as your own logic makes sense.
Eg. using objects before they are created, or changing and querying them at the same time.

I do have a couple of applications that use multi-threading, but all MapPoint code is one thread. The second thread looks after the GUI.

Add-ins run "in-thread", so they're more likely to have problems. I guess you could try spawning a new thread in C++,Delphi,etc and see what happens, but I know VB won't let you do that.


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 04-06-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Hi Richard,

My plan is to create / destroy the obect and use it in same thread context to avoid any complications. I did not try it at the moment.

Reason is that I have application receiving positions that possible are not on a digitized road. So I start running in circles until I can say: 'person is 35 meter SW of 'churchill road 322'.

This take mutch time specially if the position is far away of a road. So that's the reason of thread question.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 04-06-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 893
Blog Entries: 10
I guess that might be practical with the advent of multi-core (and hyperthreaded) cpus. Most of us are stuck on single cpu systems though


If you've plenty of memory, you could always have two MapPoint instances.


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
mappoint, safe, thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Co-op/Graduate Developer Position at Safe Software Eric Frost News and Announcements 0 11-24-2005 11:20 AM
Load new map in separate thread to keep ui responsive? TicK MapPoint 2006/2009 Discussion 3 11-11-2005 01:07 PM
Updating map in mapcontrol, through secondary thread malkotian MapPoint 2006/2009 Discussion 1 08-16-2005 03:44 PM
Can't GetActiveMap from a Thread discostu MapPoint 2006/2009 Discussion 1 06-08-2005 08:25 AM
Quick Review - Safe Software Feature Manipulation Engine for Anonymous MP2K Magazine Articles 0 01-31-2002 11:48 PM


All times are GMT -5. The time now is 10:36 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54