Often, when I use Alchemi across a small grid, I find that I get undead
threads.  When I examine the undead threads in the database, they all
have the following properties:

thread_state = 1
time_started = NULL
time_finished = NULL

The threads have been assigned but it is not clear whether the threads
have been started.  In the same DB with the same grid, I regularly see a
completed thread with time_started = NULL, so this is not a reliable
indicator of whether a thread has been started.

What could cause these two properties to not be set correctly?  Is there
some way to check the time_started/time_finished properties through the
API?

- Luis

-----Original Message-----
From: Tibor Biro [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 06, 2006 10:44 AM
To: Luis Cota; [email protected]
Subject: RE: [Alchemi-developers] How and when are ThreadStates set?

> public enum ThreadState
> {
>     Unknown = -1, // unknown or unitialized - added by Tibor Biro
>     Ready = 0, // ready to execute
>     Scheduled = 1, // executor has id
>     Started = 2, // executor has thread and is executing
>     Finished = 3, // executor has returned the finished thread
>     Dead = 4, // returned to owner OR aborted
> }
> 
> In the source, ThreadState has 5 defined states.  At what points in
the
> process can thread state be set?  

[Tibor Biro] The thread state is set by the Manager as needed. For
example
the Started state is set when the thread was started on the executor and
so
on. The Unknown state is never set and it is used as "thread state not
set"
in some internal structures.

How is a thread in each step of the
> process identified as having a particular state?

[Tibor Biro] Once the state is changed the new value is persisted to the
database.

I'm not sure if this answers your question, please follow-up if it does
not.

Regards,
Tibor





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Alchemi-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alchemi-developers

Reply via email to