
...
Starting and using background threads during class initialization can result in deadlock.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
---|---|---|---|---|---|---|
TSM02-J | Low | Probable | Yes | NoHigh | P2P4 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CodeSonar | |||||||||||||||
Include Page | CodeSonar_V | CodeSonar_V | FB.MT_CORRECTNESS.SC_START_IN_CTOR | Constructor invokes Thread.start() | Parasoft Jtest |
| TRSCERT.TSM02.CSTART | Do not call the "start" method of threads from inside a constructor | |||||||
SonarQube |
| S2693 | Threads should not be started in constructors |
...