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 / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Worker Thread appears to deadlock

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
anonymous - 18 Jan 2006 18:27 GMT
I'm working on a project where I need to add an existing chat program as a
plugin.  The framework I'm using requires that I write a Control that
inherits from their own custom control.  In the constructor for this control
I start up the threads that listen to the server.  After I start my second
thread the program deadlocks, but currently the threads are not locking on
anything.  I have found that if I place a timer with an interval of 500
ticks, start the timer in the constructor, and begin the worker threads in
the Tick event handler, the program works.  Needless to say I'm not happy
with the above solution.  Is there something I need to watch out for before
starting a background thread in a control?  If so what event should I
subscribe to?

Thanks.
Naveen - 18 Jan 2006 19:25 GMT
How do you determine that the application is a dead lock situation?
Using the !SyncBlk (SOS) command you can identify the dead locks and
trace of source for these locks.
Ilya Tumanov [MS] - 18 Jan 2006 20:27 GMT
Are you touching any UI components from worker thread without using
Control.Invoke(), e.g. updating progress bar?

If so it's destined to hang sooner or later. This issue is very familiar to
Compact Framework developers as it would hang in pretty much 100% of the
cases.

Desktop developers usually ignore this as desktop only hangs from time to
time.

Signature

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactfra
mework?hl=en

2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

> I'm working on a project where I need to add an existing chat program as a
> plugin.  The framework I'm using requires that I write a Control that
[quoted text clipped - 11 lines]
>
> Thanks.

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.