Add the thread argument to the example code in the docs

This commit is contained in:
Dave Pearson
2023-07-13 14:08:33 +01:00
parent 632aaf068f
commit 48ee8540bc

View File

@@ -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)