Throwable catching

Dicebot public at dicebot.lv
Sat Sep 28 05:38:03 PDT 2013


On Saturday, 28 September 2013 at 12:26:37 UTC, Alexandr 
Druzhinin wrote:
> Just to clear - in my case child thread processes parent 
> commands like a worker and every loop iteration isn't 
> correlated with others before and after so I thought that just 
> new iteration resets bad application state caused by Error - I 
> was wrong?

Error generally means unrecoverable application issue. It can 
result in undefined behavior if ignored, not matter what is the 
error locality. For example, out of memory error. Catching Errors 
may be viable as often as manual vtable patching or any similar 
low-level unsafe hack.

If your worker is _completely_ independent maybe you should just 
make it separate process that can be simply relaunched upon the 
Error.


More information about the Digitalmars-d-learn mailing list