Skip to content

Commit

Permalink
doc: too many threads
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Mar 9, 2023
1 parent c4ba363 commit c42dbec
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3336467.svg)](https://doi.org/10.5281/zenodo.3336467)
![ci](https://github.com/scivision/findssh/workflows/ci/badge.svg)
[![PyPi Download stats](http://pepy.tech/badge/findssh)](http://pepy.tech/project/findssh)
[![PyPI Download stats](http://pepy.tech/badge/findssh)](http://pepy.tech/project/findssh)

Platform-independently find SSH servers (or other services with open ports) on an IPv4 subnet in pure Python WITHOUT NMAP.
Scan entire IPv4 subnet in less than 1 second using Python standard library `asyncio` coroutines and a single thread.
Expand Down Expand Up @@ -62,3 +62,11 @@ Thread pool (100 thread max, slow, heavy):
1.39 s ± 213 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
```

Trying to open too many threads via ThreadPoolExecutor can cause a system error like

```
OSError: [Errno 24] Too many open files
```

Thus in practical terms, using coroutines can be significantly faster than threads while using less system resources.

0 comments on commit c42dbec

Please sign in to comment.