Skip to content

Commit da34606

Browse files
fix: make task threads daemon, so the solara server can stop when tasks are running
1 parent 7d7ffe6 commit da34606

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

solara/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def runs_in_thread():
270270
raise
271271

272272
self._result.value = TaskResult[R](latest=self._last_value, _state=TaskState.STARTING)
273-
thread = threading.Thread(target=runs_in_thread)
273+
thread = threading.Thread(target=runs_in_thread, daemon=True)
274274
thread.start()
275275
else:
276276
self.current_task = current_task = asyncio.create_task(self._async_run(call_event_loop, future, args, kwargs))

0 commit comments

Comments
 (0)