| 39 | CBool monitor_enable_ = CGRAPH_MONITOR_ENABLE; |
| 40 | |
| 41 | CStatus check() const { |
| 42 | CGRAPH_FUNCTION_BEGIN |
| 43 | if (default_thread_size_ < 0 || secondary_thread_size_ < 0) { |
| 44 | CGRAPH_RETURN_ERROR_STATUS("thread size cannot less than 0") |
| 45 | } |
| 46 | |
| 47 | if (default_thread_size_ + secondary_thread_size_ > max_thread_size_) { |
| 48 | CGRAPH_RETURN_ERROR_STATUS("max thread size is less than default + secondary thread. [" \ |
| 49 | + std::to_string(max_thread_size_) + "<" + std::to_string(default_thread_size_) + "+" \ |
| 50 | + std::to_string(secondary_thread_size_) + "]"); |
| 51 | } |
| 52 | |
| 53 | if (monitor_enable_ && monitor_span_ <= 0) { |
| 54 | CGRAPH_RETURN_ERROR_STATUS("monitor span cannot less than 0") |
| 55 | } |
| 56 | CGRAPH_FUNCTION_END |
| 57 | } |
| 58 | |
| 59 | protected: |
| 60 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected