|
|
# How to terminate a Running P&F Architecture
|
|
|
|
|
|
The P&F configuration usually triggers its termination by itself
|
|
|
when all of the data source stages (in short: producers) have finished their work. A producer
|
|
|
indicates its end of processing by invoking a particular termination method.
|
|
|
See [Write you own Producer](Producer-Stage) for more information on that method.
|
|
|
|
|
|
Since the associated termination condition is very specific for the actual
|
|
|
producer, the corresponding stage developer must explicitly define when
|
|
|
the producer should terminate itself.
|
|
|
The following termination process is then handled automatically by the framework.
|
|
|
If a producer has finished its work, it propagates a termination signal through the whole P&F
|
|
|
configuration, just like with the validation and start signal. Upon reception
|
|
|
of the termination signal, the particular stage performs its individual
|
|
|
termination logic. For example, a stage could close a connection to a remote
|
|
|
database. If all of the stages of a thread have executed their termination
|
|
|
procedure, the corresponding thread terminates itself. In this way, the
|
|
|
scheduler ensures an automatic and graceful termination. |
|
|
\ No newline at end of file |