Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SyncLock
Message
De
24/01/2011 11:22:53
 
 
À
24/01/2011 10:13:33
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01496120
Message ID:
01497196
Vues:
46
>Just thought that in case something can reset oApp.lInitialize - for whatever reason - the first test may think it's initialized and when it executes the next line it isn't anymore

That might be the case as the locking code, once done, sets oApp.lInitialize to True. So, the other instances of the same worker process, once they receive their go ahead lock, will go in it but will get out immediately by the use of the inside second oApp.lInitialize verification.

And, we want the first oApp.lInitialize verification to remain there, the outer one, as we wouldn't want each hit after that, such as a quarter millions hits a day, to use SyncLock for nothing.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform