Skip to content

Commit

Permalink
Merge pull request #3 from pomponchik/develop
Browse files Browse the repository at this point in the history
0.0.3
  • Loading branch information
pomponchik authored Sep 25, 2023
2 parents a2311ed + 9d7ca6f commit c47a1e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ It is highly desirable for library developers to use this pattern for any long-t

## Tokens

All token classes presented in this library have a uniform interface. And they are all inherited from one class: `AbstractToken`. The only reason why you might want to import it is to use it for a type hint. This example illustrates a type hint suitable for any of the tokens:
All token classes presented in this library have a uniform interface. All tokens are thread-safe. And they are all inherited from one class: `AbstractToken`. The only reason why you might want to import it is to use it for a type hint. This example illustrates a type hint suitable for any of the tokens:

```python
from cantok import AbstractToken
Expand Down Expand Up @@ -207,7 +207,7 @@ To initialize `ConditionToken`, pass a function to it that does not accept argum
```python
from cantok import ConditionToken

counter = 5
counter = 0
token = ConditionToken(lambda: counter >= 5)

while not token.cancelled:
Expand Down Expand Up @@ -312,5 +312,3 @@ from cantok import SimpleToken, CounterToken, TimeoutToken

token = CounterToken(15, SimpleToken(), TimeoutToken(5))
```

`CounterToken` is thread-safe.
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.0.3

0 comments on commit c47a1e1

Please sign in to comment.