New topic in General: Need Mutex that works across multiple users
danamac - Thu Jun 19, 2008 12:27 pm <http://forums.realsoftware.com/viewtopic.php?t=23004> The RB Mutex class, only works within a single user (this is true on both Macintosh and Windows) as far as I see in my testing. This is not a sufficient solution on systems that have more than one user and are using âFast User Switchingâ wherein multiple user applications are active and running simultaneously. I need a way that works across multiple users to control access to a hardware device. My idea is to create a file in a global location (a location that all users can read/write) and use that file as the âmutexâ. This is not really any different than how RB implements its Mutex class, except that RB creates and looks for the file in a location that is local to the user rather than global to the machine. With the RB Mutex class, a file is created when the class is instantiated, then opened for exclusive access when the âEnterâ or âTry Enterâ method is called. When another instance of the class tries to âEnterâ, determination that the Mutex is locked depends on whether the file can be successfully opened for exclusive access. I would appreciate hearing any thoughts on this or alternate methods. Thanks for any feedback!
-- Over 900 classes with 18000 functions in one REALbasic plug-in. The Monkeybread Software Realbasic Plugin v8.1. <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> [email protected]
