mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 23:49:44 +08:00
More descriptive comment in multithreaded example
This commit is contained in:
parent
4576b69e30
commit
7a77bb1c4a
@ -27,7 +27,8 @@ int main(void) {
|
||||
mg_set_option(server1, "listening_port", "8080");
|
||||
mg_set_listening_socket(server2, mg_get_listening_socket(server1));
|
||||
|
||||
// server1 goes to separate thread, server 2 runs in main thread
|
||||
// server1 goes to separate thread, server 2 runs in main thread.
|
||||
// IMPORTANT: NEVER LET DIFFERENT THREADS HANDLE THE SAME SERVER.
|
||||
mg_start_thread(serve, server1);
|
||||
serve(server2);
|
||||
|
||||
|
@ -950,8 +950,6 @@ static void sockaddr_to_string(char *buf, size_t len,
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
static struct connection *accept_new_connection(struct mg_server *server) {
|
||||
union socket_address sa;
|
||||
socklen_t len = sizeof(sa);
|
||||
|
Loading…
x
Reference in New Issue
Block a user