multi-process model: Improve
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
1 parent
c11052e302
commit
d6868b6ab3
3 files changed
+8
-2
No files matched your search
@@ -159,6 +159,7 @@ static void uh_start_worker(struct uh_server *srv, int n)
|
||||
case 0:
|
||||
ev_loop_fork(srvi->loop);
|
||||
uh_start_accept(srvi);
|
||||
ev_run(srvi->loop, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ struct uh_server {
|
||||
void (*free)(struct uh_server *srv);
|
||||
/*
|
||||
** Start n worker processes to process the requests
|
||||
** Must be called after the Server has been initialized
|
||||
** If n is -1, automatically to available CPUs
|
||||
*/
|
||||
void (*start_worker)(struct uh_server *srv, int n);
|
||||
|
||||
Reference in new issue
Block a user