Skip to content
This repository has been archived by the owner on Jul 11, 2018. It is now read-only.

Commit

Permalink
fix the initial threading count
Browse files Browse the repository at this point in the history
  • Loading branch information
gshmu committed Jun 5, 2014
1 parent 4b2faff commit 0d781a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions set_goagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from GCC import ip_set # setting ip set first.

ip_list = []
init_threading_count = threading.activeCount()


def find_host(ip):
Expand Down Expand Up @@ -76,8 +77,8 @@ def list_ping(_set):
ping_thread.start()

# once run threading.activeCount()=2 !!!maybe itself
print threading.activeCount()-2, 'threading working...'
while threading.activeCount() > 2:
print threading.activeCount() - init_threading_count, 'threading working...'
while threading.activeCount() > init_threading_count:
pass

ip_list.sort()
Expand Down

0 comments on commit 0d781a0

Please sign in to comment.