Update F-Stack_Nginx_APP_Guide.md

Handle fstack in nginx ```work process cycle```. Refer to #151.
This commit is contained in:
陈威 2018-01-26 17:44:47 +08:00 committed by GitHub
parent 9f78ac569c
commit d918f1d3ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 13 deletions

View File

@ -27,24 +27,20 @@ first one to start | | | | |
last one to exit<-+ primary worker | | secondary worker | | secondary worker | last one to exit<-+ primary worker | | secondary worker | | secondary worker |
| | | | | | | | | | | |
+--------------------+ +-------------------+ +------------------+ +--------------------+ +-------------------+ +------------------+
+--------+ +-------+ +--------+ +-------+ +--------------------+ +-------------------+
| | | | | | | | | | | |
| fstack | |channel| | fstack | |channel| | fstack,kernel | | fstack,kernel |
| main | | event | | main | | event | | and channel | | and channel |
| loop | |thread | | loop | |thread | | loop thread | | loop thread |
| thread | | | | thread | | | | | | |
| | | | | | | | +--------------------+ +-------------------+
+--------+ +-------+ +--------+ +-------+ woker process cycle woker process cycle
woker loop: worker loop:
process handle process handle
cycle channel cycle channel
event event
``` ```
- spawn primary worker firstly, and then wait for primary startup, continue to spawn secondary workers. - spawn primary worker firstly, and then wait for primary startup, continue to spawn secondary workers.
- worker process has 2 threads. main thread: ff_init();ff_run(worker_process_cycle), channel thread: loop(handle channel event). - a major addition to the worker process is fstack-handlingff_init();ff_run(worker_process_cycle); worker_process_cycle(handle channel/host/fstack event).
Note that: Note that: