Skip to content

Commit

Permalink
Clarify logging messages in README code example
Browse files Browse the repository at this point in the history
  • Loading branch information
shailshouryya committed Feb 18, 2023
1 parent c113c6a commit 5a91140
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ Dummy example:
```
from save_thread_result import ThreadWithResult
import time, random
import time, random, threading
def function_to_thread(n):
count = 0
while count < 3:
print(f'Still running thread {n}...')
print(f'Still running {threading.current_thread().name}...')
count +=1
time.sleep(3)
result = random.random()
print(f'Return value of thread {n} should be: {result}')
print(f'Return value of {threading.current_thread().name} should be: {result}')
return result
Expand All @@ -76,8 +76,8 @@ def main():
thread2.start()
thread1.join()
thread2.join()
print(thread1.result)
print(thread2.result)
print(f'The `result` attribute of {thread1.name} is: {thread1.result}')
print(f'The `result` attribute of {thread2.name} is: {thread2.result}')
main()
```
Expand Down

0 comments on commit 5a91140

Please sign in to comment.