MCPcopy Create free account
hub / github.com/cesanta/mongoose / thread_function

Function thread_function

tutorials/core/multi-threaded-12m/main.c:33–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33static void *thread_function(void *param) {
34 struct thread_data *p = (struct thread_data *) param;
35 printf("THREAD STARTED\n");
36 for (;;) {
37 sleep(2);
38 mg_wakeup(p->mgr, p->conn_id, "hi!", 3); // Send to parent
39 }
40 // Free all resources that were passed to us
41 free(p);
42 return NULL;
43}
44
45// HTTP request callback
46static void fn(struct mg_connection *c, int ev, void *ev_data) {

Callers

nothing calls this directly

Calls 1

mg_wakeupFunction · 0.50

Tested by

no test coverage detected