Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Critical Section in VFP
Message
 
 
À
05/07/2000 17:03:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00387913
Message ID:
00388587
Vues:
15
>>>When developing West-Wind applications, I made the mistake of using a Multi-use com server instead of a single-use com server and a file that was supposed to be open was being closed by on of the other threads. Variables were losing values or there values were being changed. This Com server which is separate from the West-wind com server must be a single multi-use com server. We need to have one session table opened exclusively serving the data. This separate com server will prevent the data caching that was occuring with multiple single-use com servers.
>>
>>Uhm, not exactly. You should use Single Use EXE servers. multi-use EXE servers will cause all sorts of problems with overlapping memory since the same instance is getting hit by multiple simultaneous requests.
>
>But in this case when we went to single-use, we did have some problems with data caching. I had a post on your site about this a few months back. That is why we have a separate com server just serving the Session data from a table. The way we were hoping to avoid the overlapping memory problems was with the use of critical sections.

Sorry. I still don't understand why this happens unless there are some underlying bugs inside the OS's or file system's lock management technology.

I thought that a single-threaded EXE server was absolutely safe.

I also thought that an in-process AMThreaded DLL was absolutely safe because every thread had it's own thread-local data.

So where is your data actually being walked on???

Are you having problems with public memory variables being overwritten? Private variables? DataSession-local tables? Default datasession tables?

Thanks. I'm really interested in learning more about this.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform