... | ... | @@ -344,7 +344,7 @@ while not stopping.is_set(): |
|
|
time.sleep(0.1)
|
|
|
```
|
|
|
|
|
|
The Python example follows the same principle, and this time we use the *Event* object provided by the *threading* module to share the stopping state.
|
|
|
The Python example follows the same principle as the C++ and Java examples but this time we use the *Event* object provided by the *threading* module to share the stopping state.
|
|
|
|
|
|
To finish, it is highly recommended to implement stop handler this way:
|
|
|
* Do not implement cleaning code e.g. resource deallocation in stop handlers.
|
... | ... | |