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

Method start_nothrow

libhsclient/thread.hpp:34–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 }
33 }
34 bool start_nothrow() {
35 if (need_join) {
36 return need_join; /* true */
37 }
38 void *const arg = this;
39 pthread_attr_t attr;
40 if (pthread_attr_init(&attr) != 0) {
41 fatal_abort("pthread_attr_init");
42 }
43 if (pthread_attr_setstacksize(&attr, stack_size) != 0) {
44 fatal_abort("pthread_attr_setstacksize");
45 }
46 const int r = pthread_create(&thr, &attr, thread_main, arg);
47 if (pthread_attr_destroy(&attr) != 0) {
48 fatal_abort("pthread_attr_destroy");
49 }
50 if (r != 0) {
51 return need_join; /* false */
52 }
53 need_join = true;
54 return need_join; /* true */
55 }
56 void join() {
57 if (!need_join) {
58 return;

Callers

nothing calls this directly

Calls 1

fatal_abortFunction · 0.85

Tested by

no test coverage detected