message: fix exit condition in dummy example
  the script was not exiting properly when multiple participants were
  started.
diff: -import logging
  -import threading
  import argparse
  +import logging
  import pickle
  +import threading
  # pylint: disable=import-error
  import numpy as np
  @@ -49,12 +49,12 @@ def participant_worker(participant, url, heartbeat_frequency, exit_event):
  run_participant(participant, url, heartbeat_frequency=heartbeat_frequency)
  except KeyboardInterrupt:
  exit_event.set()
  - return
  # pylint: disable=bare-except
  except:
  LOG.exception("participant exited with an error")
  exit_event.set()
  - return
  + else:
  + exit_event.set()
  def main(
  @@ -72,7 +72,8 @@ def main(
  run_participant(
  participant, coordinator_url, heartbeat_frequency=heartbeat_frequency
  )
  - else:
  + return
  +
  exit_event = threading.Event()
  threads = []
  for _ in range(0, number_of_participants):
  @@ -84,8 +85,17 @@ def main(
  thread.daemon = True
  thread.start()
  threads.append(thread)
  - exit_event.wait()
  + def join_threads():
  + for thread in threads:
  + thread.join()
  + LOG.info("all participants finished")
  + exit_event.set()
  +
  + monitor = threading.Thread(target=join_threads)
  + monitor.daemon = True
  + monitor.start()
  + exit_event.wait()
  if __name__ == "__main__":
  # pylint: disable=invalid-name
  