Skip to content

Commit a1998b3

Browse files
authored
Update README.md
1 parent 032bb5f commit a1998b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A quick launch mode is added, just type ``imthread.start(func_name, repeat=10)``
1212

1313
After using this library for a number of times in various projects i found that if you pass in lots of data say ``1000`` data in a list, it was creating ``1000`` threads to do it all once, how ever in the practical world most of the times cpu's are not capable of creating so many threads at once or worse it eats up all resources at once. To prevent this problem now you can pass in ``max_threads`` value by default if you don't pass in the value it will automatically be set equal to 4 just for the safety purpose, and passing a `0` value will throw an error while creating a ``imthread`` object this way it will only create specified number of threads at once and will wait untill the previously started threads has finished their job.
1414

15-
Other than that to keep a track on how many threads are been created in real time you can push in a new log method inn you processing function so that whenever a new thread is created you can see it. there ar two methods of tracking them.
15+
Other than that to keep a track on how many threads are been created in real time you can push in a new log method inn you processing function so that whenever a new thread is created you can see it, there ar two methods of tracking them.
1616

1717
- just to print out the thread number which is being created, use: `` imthread.console_log(output=True)``
1818
- if you want to store it in some variable you can use: ``thread_number = imthread.console_log()``

0 commit comments

Comments
 (0)