On Thu, 18 Sep 2008, Szak�ts Viktor wrote:

Hi Viktor,

> I also have one:
> If a given thread gets a non-handled RTE, or, an internal
> error, will the whole application fail and exit, or just
> the thread where the error occured?

RT errors, begin sequence / break / recover / always statements,
object destructs, quit, are handled by each thread separately by
the thread when the event happen without inter thread interaction.
Each thread has it's own error handler by default initialized
by ERRORSYS() function call at thread startup. You can create
MT safe code using above construction without any problems,
There is only one exception QUIT executed by main thread sends
QUIT requests to all other HVM threads and waits for their
termination. Then it executes all exit procedures. The same
happens when main thread finish its job returning for main
startup function.

With the internal error situation is different. They are
generated in unusual situations when we cannot continue farther
execution safely, f.e. due to internal HVM structures corruption.
Internal error handler executes exit() function which may terminate
the whole program but does not have to. It may also suspend only
calling thread waiting for others (f.e. until they terminate
or reach some place where can be killed). It's platform dependent
behavior. The one thing we can make in such case yet is sending non
blocking QUIT request to all other HVM threads before calling exit().
Probably I'll add it ASAP.

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to