Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] make a bgzf_thread_count a single variable
bgzf_thread_count was declared `inline static` outside of the scope of a class. In this case the `inline` allows the variable to break the one definition rule. Meaning there can be multiple symbols across different translation that all declare `bgzf_thread_count`. In this case the linker will choose one of the defined symbols. (Without inline it would throw a multiple definition error). The `static` keyword (in this context) means that the created symbol is only visible inside this translation unit. Meaning, there are now symbols for the linker to work with. This makes the `inline` keyword kind of useless. This combination leads to every translation unit having there own `bgzf_thread_count` variable. The fix is simple, we remove the `static` keyword. This should have the intended behavior. Thought: maybe it should be declared `thread_local`.
- Loading branch information