mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add the thread argument to the example code in the docs
This commit is contained in:
@@ -23,7 +23,7 @@ class WeatherApp(App):
|
||||
"""Called when the input changes"""
|
||||
self.update_weather(message.value)
|
||||
|
||||
@work(exclusive=True)
|
||||
@work(exclusive=True, thread=True)
|
||||
def update_weather(self, city: str) -> None:
|
||||
"""Update the weather for the given city."""
|
||||
weather_widget = self.query_one("#weather", Static)
|
||||
|
||||
Reference in New Issue
Block a user