当前位置:网站首页>函数关系简
函数关系简
2022-07-16 05:02:00 【飞扬1234】
函数关系
ngx_master_process_cycle
ngx_setproctitle
ngx_start_worker_processes
for(i=0;i<threadnums;i++) //循环多次创建子进程
ngx_spawn_process(i,"worker process");
pid=fork();
//执行的进程分支判断。对于父进程分支,直接返回;对于子进程分支,继续往下看
ngx_worker_process_cycle //子进程才会执行该分支
ngx_worker_process_init
sigprocmask(SIG_SETMASK, &set, NULL) //取消信号屏蔽
g_threadpool.Create(tmpthreadnums); //创建线程池中线程
g_socket.Initialize_subproc(); //子进程一些初始化
g_socket.ngx_epoll_init(); //执行CSocket::ngx_epoll_init
epoll_create(……);
ngx_epoll_add_event(……);
epoll_ctl(……);
ngx_setproctitle //专门为子进程设置标题
for(;;)
//worker进程就在这个无限的for循环中循环着
ngx_process_events_and_timers(); //处理网络事件等
g_socket.ngx_epoll_process_events(-1);
epoll_wait(……);
g_threadpool.StopAll(); //停止线程池
g_socket.Shutdown_subproc(); //socket释放需要释放的资源
//以下的执行分支只有在master进程中会执行到
sigemptyset(&set);
for( ;; )
master进程就在这个无限的for循环中循环着
边栏推荐
- 【深度强化学习-笔记 02】
- ES2022 Array.at( )
- 关系图/族谱
- Simulation volume leetcode [general] 1996 Number of weak characters in the game
- [brand special session] breakthrough across x, new opportunities for audio and video cohesion
- [atlas quick start]
- Some useful web addresses
- QT使用多线程
- QT uses multithreading
- 单自由度系统的随机振动计算与仿真验证
猜你喜欢

用过useEffect,useLayoutEffect吗

Sword finger offer19 regular expression matching string dynamic programming

160_ Skills_ Power Bi new function - calculate working days

Shuttle simulated rocket launch animation

基于JSP+Servlet的高校人事管理系统

【AI芯片CAISA】

视频处理及编解码硬件系统优化设计

MySQL常用查询

Matlab manipulator modeling kinematics simulation + trajectory planning

math_ Derivation of ordering inequality
随机推荐
kettle版本8.2的中文乱码问题
微信小程序实训|基于云数据库的语文听写工具
Docker installs redis cluster
(QT) plug in of QT project
CI (continuous integration), CD (continuous deployment)
[cityengine] cityengine2019 installation and use and city model construction
[deep learning - learning notes 01]
math_basic简单不等式组的导出结论
【深度学习-学习笔记01】
Two low-cost ways to attract users with integral check-in
PHP QRcode generates QR code
[the most complete and detailed] seven distributed global ID generation strategies
The version of NPM does not match that of node. When the NPM result is updated, an error is reported. How can the previous NPM version be returned? Or how to check the NPM version of node adaptation
二叉树的广度遍历
The principle and implementation of PageRank
Binary search tree BST
视频处理及编解码硬件系统优化设计
Feign implements inter service and passes headers when calling
One dragon and snake sort (my first test question)
Tomato learning notes -vscade configuring makefile (using task.jason and launch.jason)