I'm not sure about doing it purely within your python script, but if you can split the text into a number of chunks equal to your available threads, then you can use batch scripts to call some additional script you might have for processing, which in turn can handle the re-combination of your full job.
for instance, if you create a small batch script with '.cmd' as the extension, and simply make it run a given python script:
<pre lang="BAT">setlocal enableextensions
start /min python.exe "%~dp1" "%~dp2" 2>&1
And then a '.bat' script to run it on each chunk concurrently:
start /min call %~dp0runpython.cmd yourpythonscript.py chunk1.txt
start /min call %~dp0runpython.cmd yourpythonscript.py chunk2.txt
I have not tested this exact example, so expect possiblly needing to adjust quotation if you experience odd behavior. best bet would be to leave out the quotes and use paths that don't contain any spaces.
the main points are the "start /min call *.cmd" that calls the given cmd script and immediately moves to the next command without waiting for a return, and '2>&1' which will forward all command output to the void(output in the command prompt accounts for a *large* portion of many slowdowns when processing many items.)
Alternatively, you can do '>chunk1_finished.txt' or similar to output to a file, which is just as fast.