Skip to content
Discussion options

You must be logged in to vote

It looks to me like the issue here is that the code doesn't observe this warning from the documentation on threaded workers:

Most Textual functions are not thread-safe which means you will need to use call_from_thread to run them from a thread worker. An exception would be post_message which is thread-safe. If your worker needs to make multiple updates to the UI, it is a good idea to send custom messages and let the message handler update the state of the UI.

Calling notify directly from a threaded worker would be an example of something not to do. Your calls to show a notification should, as per the documentation, either be a post_message to the application where it calls notify, or al…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by willmcgugan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3264 on September 09, 2023 05:32.