Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / August 2007

Tip: Looking for answers? Try searching our database.

Application.Lock()/UnLock() or lock(Application)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nano2k - 23 Jul 2007 08:51 GMT
Hello

Is there a difference between:

1.
Application.Lock();
try {
 //...code
}
finally {
 Application.UnLock();
}

pattern and
2.
lock(Application) {
 //...code
}

?

I read on MSDN (http://support.microsoft.com/default.aspx/kb/271787)
that there are some situations when the first pattern blocks the
service.

Thanks.
Luis Ruiz Pavón - 24 Jul 2007 12:28 GMT
Hi:

The first pattern is only applied to application state in web applications
while second pattern is a rapid and easily implementation of Monitor (enter()
and exit()) class valid for many situations.

Sorry for my english!!!

Regards

Signature

Colabora con el foro: Si la respuesta te es de utilidad marca la pregunta
como respondida.
Luis Ruiz Pavón
MCP - MCTS
Blog: http://geeks.ms/blogs/lruiz

> Hello
>
[quoted text clipped - 22 lines]
>
> Thanks.
nano2k - 09 Aug 2007 10:31 GMT
On 24 Iul, 14:28, Luis Ruiz Pav?n <luis_ruiz_pa...@hotmail.com> wrote:
> Hi:
>
[quoted text clipped - 41 lines]
>
> - Afi are text ?n citat -

Thanks Luis for your response
What is your recommendation. Should we use pattern 1 or pattern 2?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.