Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
A few cleanups to make init and tear-down clearer for both NonJavaThreads and JavaThreads. In particular: - Move NJT-list management to init/tear-down of the active thread, instead of constructor/destructor - Factor out common code across different kinds of NJTs - Make it easier to add init/teardown code across thread types Proposed approach in non-virtual call_run: void call_run() { // common init for all threads ... // virtual init this->pre_run(); this_run(); // common teardown // virtual teardown this->post_run() // Note: can't reference 'this' here as post_run may have deleted it ... }
|