Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "adf_core_python"
version = "0.2.5"
version = "0.2.6"
description = "Agent Development Framework for Python"
readme = "README.md"
authors = [
Expand Down
18 changes: 14 additions & 4 deletions src/adf_core_python/core/launcher/agent_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,30 @@ def launch(self) -> None:

gateway_launcher = GatewayLauncher(gateway_host, gateway_port, self.logger)

lock = threading.Lock()
connector_thread_list: list[threading.Thread] = []

for connector in self.connectors:
threads = connector.connect(
component_launcher, gateway_launcher, self.config, self.loader
)
self.agent_thread_list.extend(threads)

def connect() -> None:
for thread in threads:
thread.daemon = True

with lock:
self.agent_thread_list.extend(threads)

def start_connector_threads(
threads: dict[threading.Thread, threading.Event],
) -> None:
for thread, event in threads.items():
thread.daemon = True
thread.start()
event.wait(5)

connector_thread = threading.Thread(target=connect)
connector_thread = threading.Thread(
target=start_connector_threads, args=(threads,)
)
connector_thread_list.append(connector_thread)
connector_thread.start()

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading