2016-05-12 04:36:12 +08:00
|
|
|
---
|
|
|
|
title: "mg_enable_multithreading()"
|
|
|
|
decl_name: "mg_enable_multithreading"
|
|
|
|
symbol_kind: "func"
|
|
|
|
signature: |
|
|
|
|
void mg_enable_multithreading(struct mg_connection *nc);
|
|
|
|
---
|
|
|
|
|
2016-07-26 22:53:33 +08:00
|
|
|
Enables multi-threaded handling for the given listening connection `nc`.
|
2016-05-12 04:36:12 +08:00
|
|
|
For each accepted connection, Mongoose will create a separate thread
|
2016-07-26 22:53:33 +08:00
|
|
|
and run an event handler in that thread. Thus, if an event handler is doing
|
|
|
|
a blocking call or some long computation, it will not slow down
|
2016-05-12 04:36:12 +08:00
|
|
|
other connections.
|
|
|
|
|