Skip to content

Commit

Permalink
Update src/py/flwr/client/heartbeat.py
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel J. Beutel <[email protected]>
  • Loading branch information
panh99 and danieljanes authored Mar 29, 2024
1 parent e28cc8c commit c2dbf28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/py/flwr/client/heartbeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def _ping_loop(ping: Callable[[], None], stop_event: threading.Event) -> None:


def start_ping_loop(
ping: Callable[[], None], stop_event: threading.Event
ping_fn: Callable[[], None], stop_event: threading.Event
) -> threading.Thread:
"""Start a ping loop in a separate thread.
This function initializes a new thread that runs a ping loop, allowing for
asynchronous ping operations. The loop can be terminated through the provided stop
event.
"""
thread = threading.Thread(target=_ping_loop, args=(ping, stop_event))
thread = threading.Thread(target=_ping_loop, args=(ping_fn, stop_event))
thread.start()

return thread

0 comments on commit c2dbf28

Please sign in to comment.