Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access and Assign
Message
From
23/12/1998 16:44:00
 
 
To
23/12/1998 15:46:40
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00169870
Message ID:
00170095
Views:
29
>Hi Edwin ---
>
>Thats a good question! Logically, though, one would think that VFP queues up changes to a given property and that would mean that changes would be sequential.

I am not so sure. I can think of two scenarios whose behavior is not so easy to predict. The first is allowing the _Access and _Assign methods to modify other properties of the object at the same time. The second is having outside events interrupt the execution of the code in the _Access and _Assign methods (see AutoYield property and VFP processing of Windows events) and potentially calling code that modifies the property being managed by the _Access or _Assign method that is currently running
In the first case the locking strategy that VFP uses for properties becomes important. If each object instance or even just each object class has a semaphore(a flag that only allows one thread of execution to access a given resource(section of code, property, etc.)), then it should be possible to switch a set of properties from one set of values to another without any chance of them being overwritten by any code that is run in response to an outside event. If the semaphore is at the property level then this would not be the case.
I am not at all sure what would happen in the second case. The strategy that VFP uses to control property access will still be important. If VFP has locked the object property then I would expect the property change would be queued(hopefully not discarded), but I am not certain that code called in this manner would even respect the semaphore used by access/assign, it might even fire _Access or _Assign events!
Anyway, it seems like having answers to these questions would make the new access and assign methods/events more useful.

Thanks,
Ned
Ned

Reality is.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform