IT Community - Software Programming, Web Development and Technical Support

When working with shared data in threading how do you implement synchronization in a

This is a discussion on When working with shared data in threading how do you implement synchronization in a within the ASP and ASP.NET Programming forums, part of the Web Development category; When working with shared data in threading how do you implement synchronization in asp.net?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ASP and ASP.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-26-2007, 04:02 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Question When working with shared data in threading how do you implement synchronization in a

When working with shared data in threading how do you implement synchronization in asp.net?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-26-2007, 04:07 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: When working with shared data in threading how do you implement synchronization

There are certain situations that you need to be careful with when using threads. If two threads (e.g. the main and any worker threads) try to access the same variable at the same time, you'll have a problem. This can be very difficult to debug because they may not always do it at exactly the same time. To avoid the problem, you can lock a variable before accessing it.
However, if the two threads lock the same variable at the same time, you'll have a deadlock problem.
SyncLock x '

Do something with x

End SyncLock
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UNLIMITED Shared & Reseller Web Hosting!! iwishost Web Hosting Deals 1 04-23-2008 01:58 AM
Threading in VB.Net Tips S.Vinothkumar VB.NET Programming 16 10-30-2007 07:55 AM
How to implement threading in VB.Net? amansundar VB.NET Programming 2 10-30-2007 07:41 AM
Threading in C# .Net 2005 : a.deeban C# Programming 53 09-10-2007 07:27 AM
How can I implement opaque (abstract) data types in C? prasath C and C++ Programming 1 07-30-2007 04:24 AM


All times are GMT -7. The time now is 09:23 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0