-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Hello,
I was hoping to use mstoolkit in a multi-threaded (with a private MSReader object per thread), but ran into issues. So far, I noticed the following needs to be changed:
- Use
strtok_s()(Windows) orstrtok_r()instead ofstrtok(), as the latter uses a static buffer and is therefore not thread safe. See e.g. https://stackoverflow.com/a/54702249 - The
lLastScanIndexvariable defined inmzParser.his static. Moving this to a member variable ofRAMPFILEseems like a proper solution.
So far, I quickly patched the above changes, and things seem OK. But at the moment I am also only using just the mzML part of the library. If more issues will arise, I will update this issue again.
Thanks,
Rick
edit1: I made the issue more generic for threading after noticing more issues.
Metadata
Metadata
Assignees
Labels
No labels