Last modified 11 years ago Last modified on 20.06.2007 13:56:02

Fawkes Guarantees

If software is run in the Fawkes framework there are several guarantees that you can rely on. They have been carefully implemented such that exceptions are detected and handled appropriately. You do not have to add extra checks to your software to verify that the guarantees are met. They either are met or otherwise a crash is the most likely result, in which case the problem has to debugged in Fawkes itself since such a problem is considered to be a bug in the Fawkes framework.

The guarantees are printed in italics.


Thread and here especially the [doxygen:Thread] implementation has several intrinsic guarantees.

Intialization and finalization

Threads are only started if they have been successfully and completely initialized.

This means that a thread is only started if all aspects of the thread could be successfully initialized and Thread::init() was run without throwing an exception.

Threads in a [doxygen:ThreadList] are only started if all threads have been successfully and completely initalized

This means that a thread list shall only be started if all threads in this list have been successfully initialized. If only one thread fails in this list to initialize no thread of this list is ever started.

Thread::finalize() is called after an successfuly Thread::init(), Thread::prepare_finalize() only on a running thread

There are several conditions to remind when thinking about initialization and finalization. In general init() is called (sometimes it is not, for instance if another thread from the very same thread list failed during initialization). If the thread is then deleted (no matter whether it ran or not) finalize() is called (it is not called if this thread's init() failed!). If the thread ran, prepare_finalize() is called before the call to finalize(). You can query whether prepare_finalize() was called via the protected variable bool Thread::finalize_prepared.