MCPcopy Create free account
hub / github.com/DeNA/HandlerSocket-Plugin-for-MySQL / start_nothrow

Method start_nothrow

client/hslongrun.cpp:119–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 }
118 }
119 bool start_nothrow() {
120 if (need_join) {
121 return need_join; /* true */
122 }
123 void *const arg = this;
124 pthread_attr_t attr;
125 if (pthread_attr_init(&attr) != 0) {
126 fatal_abort("pthread_attr_init");
127 }
128 if (pthread_attr_setstacksize(&attr, stack_size) != 0) {
129 fatal_abort("pthread_attr_setstacksize");
130 }
131 const int r = pthread_create(&thr, &attr, thread_main, arg);
132 if (pthread_attr_destroy(&attr) != 0) {
133 fatal_abort("pthread_attr_destroy");
134 }
135 if (r != 0) {
136 return need_join; /* false */
137 }
138 need_join = true;
139 return need_join; /* true */
140 }
141 void join() {
142 if (!need_join) {
143 return;

Callers

nothing calls this directly

Calls 1

fatal_abortFunction · 0.85

Tested by

no test coverage detected