Skip to content

Commit

Permalink
0.0.7: Provide start, end, & runtime duration logging for thread
Browse files Browse the repository at this point in the history
- ==> If you want to mute logging this message to the terminal for all ThreadWithResult instances, set the `log_thread_status` class attribute to False:

```
ThreadWithResult.log_thread_status = False
```
- ==> If you only want to mute logging this message to the terminal for a specific instance of ThreadWithResult, set the `log_thread_status` attribute for the specific instance to False:

```
thread_with_result_instance.log_thread_status = False
```
- Keep in mind python prioritizes the `log_thread_status` instance attribute over the `log_thread_status` class attribute!
- ==> If you want to log this message to an output file (or multiple output files) for all ThreadWithResult instances, set the `log_files` class attribute to an iterable object contatining objects that support the `.write()` method:

```
ThreadWithResult.log_files = [file_object_1, file_object_2]
```
- ==> If you only want to log this message to an output file (or multiple output files) for a specific instance of ThreadWithResult, set the `log_files` attribute for the specific instance to an iterable object contatining objects that support the `.write()` method:

```
thread_with_result_instance.log_files = [file_object_1, file_object_2]
```
- Keep in mind python prioritizes the `log_files` instance attribute over the `log_files` class attribute!
- ==> To see a more detailed explanation, see the updated documentation with

```
import save_thread_result
help(save_thread_result)
```
- release 0.0.7 also removes the irrelevant "Operating System :: RISC OS" PyPI classifier
  • Loading branch information
shailshouryya committed Jun 19, 2021
1 parent b33ff57 commit cbd2bcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/save_thread_result/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from datetime import datetime


__version__ = '0.0.6'
__version__ = '0.0.7'
__author__ = 'Shail-Shouryya'
__email__ = '[email protected]'
__development_status__ = '4 - Beta'
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# 3. MAINTENANCE version when they make backwards-compatible bug fixes.
# Adopting this approach as a project author allows users to make use of “compatible release” specifiers, where name ~= X.Y requires at least release X.Y, but also allows any later release with a matching MAJOR version.
# Python projects adopting semantic versioning should abide by clauses 1-8 of the Semantic Versioning 2.0.0 specification: https://semver.org/.
version = '0.0.6',
version = '0.0.7',
name = 'save-thread-result',
description = 'Simple subclass wrapper around `threading.Thread` to get the return value from a thread in python. Exact same interface as `threading.Thread`! 🌟 Star this repo if you found it useful! 🌟',
long_description = long_description,
Expand Down

0 comments on commit cbd2bcc

Please sign in to comment.