Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is my buddy running?
Message
De
09/10/2000 14:16:34
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00426835
Message ID:
00426949
Vues:
15
>>That's one advantage to using the Event object; Windows releases any Event handles held by a terminated process or thread even if the termination occurs abnormally, such as a call to TerminateProcess(). You also don't run into lock latency issues which can arise in network environments.
>
> Ed, can you explain how your Event object works through network? What is difference between file checking and you method? Sorry for I'm asking that, but I'm not well-experiensed in networking...

The Event object operates on a single system (it will work across desktops on WTS). You'd need to use a comparable synchronization mechanism such as a named pipe or mailslot to be visible to a domain or workgroup environment; you're looking for a synchronization object that exists as long as at least one process retains a handle to the synchronization object, and that does not rely on a disk presense or is subject to vagaries of the distributed cache. If I needed an IPC mechanism in this format, I'd probably choose to use MSMQ, which has a COM interface, and can be configured in several ways.

Your objective is to publish a detectable resource to a namespace visible to all processes that need to reference it, and that do not rely on sever behaviors that can delay the detection of a disconnect. The standard file locking mechanism is unacceptable in this regard; in some environments, detection of the disconnect can be delayed for significant time (some peer-to-peer environments with a Win9x Computer Browse Master can take in excess of 11 minutes to detect the loss of a lock by a failed system, and some NetWare clients had behaviors where a crashed system holding a file lock on a NetWare-managed resource did not detect the loss of active lock until the affected station explicitly requested a new login, or a supervisor intervened and force the release of the lock.) While file locking is easy to implement in VFP, you're subject to problems not controllable from VFP.

I'd suggest reading the MSDN Library topics on process synchronization mechanisms for an overview.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform