From a477058a1acbb9120aecedab04b6214820968d8f Mon Sep 17 00:00:00 2001 From: Tai Sakuma Date: Sun, 30 Jun 2024 10:43:14 -0400 Subject: [PATCH] Update the state diagram in docstring --- atpbar/machine.py | 47 +++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/atpbar/machine.py b/atpbar/machine.py index 5d44b60..e7cfb28 100644 --- a/atpbar/machine.py +++ b/atpbar/machine.py @@ -10,36 +10,27 @@ State Diagram: - .----------------------------------------------. - | | - | .-------------. | - | .--------->| Initial | | - | | '-------------' | - | | | prepare_reporter() | - | shutdown() | flush() | - | | v | - | | .-------------. | - | '----------| Active |<---------. | - | '-------------' | | - | |on_yielded() | | - | | | | - | v on_resumed() | - | .-------------. | | - | | Yielded |----------' | - | '-------------' | - '----------------------------------------------' - | | - |--------------------------. |-------------. - register_reporter() | | disable() | - | | | | - v | v | - .-------------. .-------------. | - | Registered | | Disabled | | - '-------------' '-------------' | - | | - '---------------------------------------------' + .-------------. shutdown() + | Initial |<------------------* + '-------------' + | prepare_reporter() + | flush() + v + .-------------. on_resumed() .-------------. + | Active |<---------------->| Yielded | + '-------------' on_yielded() '-------------' + register_reporter() .-------------. + *----------------------->| Registered | + '-------------' + + + disable() .-------------. + *----------------------->| Disabled | + '-------------' + +NOTE: In a forked sub-process, the state starts from the same state as the parent process. '''