HighTechTalks DotNet Forums  

RE: ThreadStart method problem?

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss RE: ThreadStart method problem? in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ravichandran J.V.
 
Posts: n/a

Default RE: ThreadStart method problem? - 05-16-2005 , 07:35 AM






Are you using this code in ASP.Net ?

Please also post your full code because it will give a better idea.

And what kind of processing does your machine support - symmetric or
master-slave?

with regards,

J.V.


"ram mohan via .NET 247" wrote:

Quote:
Hi,

I am using using ThreadStart to create three threads that run a worker process, and then call Start on the threads. These 2 statemetns are executed properly but the worked method is not being started!.


{
Thread[] listenerThreads;
WorkerClass[] listener;

...... more initialisation code here

listenerThreads[i]=new Thread(new ThreadStart(listeners[i].DoListen)); -> (1)
listenerThreads[i].Start(); -> (2)
string isAlive = listenerThreads[i].IsAlive.ToString(); -> (3)
string ThreadState = listenerThreads[i].ThreadState.ToString(); -> (4)
.....
}

all 1-4 statements are executed with out any exception but the thred does not get startedd (the DoListen() is never called since some print statements in this functions are not executed). The isAlive is 'true' and ThreadState is 'Unstarted'.

I a running this app on a dual processor machine. The same code base and app was running properly on other production servers but when installed on a new server the Dolisten() method never gets invoked.

Any clues what can be the problem?

Thanks a zillion in adv,
Ram.


--------------------------------
From: ram mohan

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

Id>K7QPlbEdPEiw9VXycsYfOg==</Id


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.