Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SyncLock
Message
De
24/01/2011 11:41:59
 
 
À
24/01/2011 11:36:17
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:
01497199
Vues:
51
>As I replied to Bonnie, you may want to add an initializer to the dictionary property
>
>For a non static property it will initalize when oApp is instantiated
>
>for a static property, it will initialize when the static class is first accessed or the static property is first accessed
>
>http://msdn.microsoft.com/en-us/library/ms182275(v=VS.100).aspx
>
>
>You don't need any locks then - as I see it

oApp is declared as:
        Public Shared oApp As Framework.App = New Framework.App()
Are you saying I wouldn't need any lock if I change its declaration? Because, this is when we came to that architecture when we discovered that simultaneous hits from the same worker process where firing at startup, which is always the case if you send a compilation when you have traffic, as the time .NET takes to load the new DLL, this creates a queue, thus several hits waiting to be processed, thus more than one per worker process.

I have something that is working now. I am not sure removing the lock would make it the same.
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