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

Function thread_function

tutorials/core/multi-threaded/main.c:32–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30};
31
32static void *thread_function(void *param) {
33 struct thread_data *p = (struct thread_data *) param;
34 sleep(2); // Simulate long execution
35 mg_wakeup(p->mgr, p->conn_id, "hi!", 3); // Respond to parent
36 mg_free((void *) p->message.buf); // Free all resources that were
37 free(p); // passed to us
38 return NULL;
39}
40
41// HTTP request callback
42static void fn(struct mg_connection *c, int ev, void *ev_data) {

Callers

nothing calls this directly

Calls 2

mg_wakeupFunction · 0.50
mg_freeFunction · 0.50

Tested by

no test coverage detected