Skip to content

Conversation

@KingAkeem
Copy link
Member

@KingAkeem KingAkeem commented Aug 5, 2018

Changes Proposed

  • Use multithreading with queue in order to increase speed of link status detection algorithm

Explanation of Changes

Threads are pre-spawned and jobs are managed using a queue in order to avoid race conflicts.

areas.

Added Daemon threads back to remove hanging if blocking occurs once the
rest of the program has terminated
@PSNAppz
Copy link
Member

PSNAppz commented Aug 6, 2018

@KingAkeem is there any mechanism to provide the no of threads? like -t 100 ?

@PSNAppz PSNAppz added this to the TorBot v1.3 milestone Aug 6, 2018
@KingAkeem
Copy link
Member Author

@PSNAppz No the user shouldn't be allowed to select the number of threads, it's directly based off the amount of work needed to be done. It's optimal for the algorithm.

@PSNAppz
Copy link
Member

PSNAppz commented Aug 6, 2018

@KingAkeem I think that feature would be a plus.

@KingAkeem
Copy link
Member Author

It wouldn't work well due to Python's threading scheme. If someone were to pass 1 thread then it would completely destroy the algorithm. The queue needs a certain amount of space to run efficiently. It makes much more sense to base it off the amount of work necessary and it makes the function much more flexible and able to be used as an API instead.

@KingAkeem KingAkeem merged commit d80d33a into DedSecInside:dev Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants