MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / check

Function check

src/UtilsCtrl/ThreadPool/UThreadPoolConfig.h:41–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
59protected:
60 /**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected