#860 closed defect (fixed)
omic::DNA is not thread safe
Reported by: | Peter | Owned by: | Peter |
---|---|---|---|
Priority: | trivial | Milestone: | yat 0.14 |
Component: | omic | Version: | trunk |
Keywords: | Cc: |
Description
The DNA class contains static variables, which means there is a potential race condition if multiple threads reach the init()
unction at the same time.
void init(void) { if (!char2code_.empty()) return; char2code_.resize(128,255); code2char_ = " ACMGRSVTWYHKDBN"; for (unsigned short i=0; i<code2char_.size(); ++i) char2code_[static_cast<size_t>(code2char_[i])] = i; }
Change History (2)
comment:1 Changed 6 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 6 years ago by
Milestone: | yat 0.x+ → yat 0.14 |
---|
Note: See
TracTickets for help on using
tickets.
(In [3502]) Avoid static variables. fixes #860.