PCSDK-Mastership requests in a multithreaded app?
                
                    DanS                
                
                     ✭✭                
            
                        
            Anyone out there used the Mastership request object within a multithreaded application? I'm wondering how this behaves if multiple threads are all trying to request mastership from within the same program.
Thanks,
Dan.
Dan.
John Wiberg2012-03-07 13:58:33
0  
            Comments
- 
            Anyone else doing this?0
 - 
            
Never tried it myself but mastership is exactly that - one is master the rest is not.So if one thread would have mastership any new requests would be denied.But if you have a common controller object then you could handle that in a multithreaded app. Just get mastership once and then use Controller.IsMaster to check every now and then. Then use a reference to the common controller and pass through to all different parts of the code.John
Developer Center0 
Categories
- All Categories
 - 5.6K RobotStudio
 - 401 UpFeed
 - 21 Tutorials
 - 15 RobotApps
 - 306 PowerPacs
 - 407 RobotStudio S4
 - 1.8K Developer Tools
 - 250 ScreenMaker
 - 2.9K Robot Controller
 - 363 IRC5
 - 81 OmniCore
 - 8 RCS (Realistic Controller Simulation)
 - 853 RAPID Programming
 - 31 AppStudio
 - 4 RobotStudio AR Viewer
 - 19 Wizard Easy Programming
 - 110 Collaborative Robots
 - 5 Job listings
 
