Okay. Looking at the code I see nothing -- other than perhaps the implementation of logmsg which you haven't supplied -- to suggest that it is your code that is preventing concurrency.
Having scanned a little of the information I can find about the blast program, I strongly suspect that it is serialising access to it database file -- probably through file locking. So the problem would also exist if you were using fork.
The solution I would try is to use different databases for the concurrent runs. If the nature of your workload means that you only want to use a single database, then you could make N (where N is the number of cores) copies of that db file and have each thread operate against a different copy. I am assuming that the blast program is using the db for reference only, not updating it.
In reply to Re^3: Multithreads with an executable in the worker subroutine (fork (probably) won't help)
by BrowserUk
in thread Multithreads with an executable in the worker subroutine
by lskatz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |