Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access and Assign
Message
 
 
À
23/12/1998 00:16:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00169870
Message ID:
00169974
Vues:
37
>>Has anyone looked at the locking behavior of _Access and _Assign methods? I know for example that the _Assign method will not fire if it changes its own property. I suspect that the property being managed by the _Access or _Assign method cannot be changed while the code is running. Does anyone know if other property values can be changed from outside the object while one property's _Access or _Assign code is running?
>>The basic question is how many semaphores does VFP use to control access to object properties (one per object instance, one per class, one per property)?
>>
>>TIA
>>Ned
>
>If I understand your question correctly, this is not an issue. Since VFPs processes are single threaded, a property cannot be changed while code is running. Even COM servers with the apartment threading model still block simultaneous calls, forcing them to run serially.

Our VFP apps may be single threaded but they can still be interrupted. By default windows events are processed between execution of lines of VFP code (Look at the property AutoYield). The last system that I worked on had to be written with the assumption that it could be interrupted, that is we had to write reentrant code.

You do raise a good point: Can code in _Access/_Assign methods be interrupted subject to the AutoYield setting?

Thanks,
Ned
Ned

Reality is.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform