Skip to content

Instantly share code, notes, and snippets.

@sujayy1983
Created January 14, 2015 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sujayy1983/4861a2935d3e500befa6 to your computer and use it in GitHub Desktop.
Save sujayy1983/4861a2935d3e500befa6 to your computer and use it in GitHub Desktop.
Entrypoint file.
"""
@Author Sujayyendhiren Ramarao
@Description Entry point for the multiprocessing example
"""
from multiprocessing import Process, Lock, Value
import discoverLanIps
if __name__ == '__main__':
lock = Lock()
num = Value('d', 0.0)
proc1 = Process(target=discoverLanIps.proc_handler, args=(lock, 'discover', num,))
proc1.start()
proc2 = Process(target=discoverLanIps.proc_handler, args=(lock, 'cleanup',num,))
proc2.start()
proc3 = Process(target=discoverLanIps.proc_handler, args=(lock, 'logging',num,))
proc3.start()
proc1.join()
proc2.join()
proc3.join()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment