@@ -82,7 +82,7 @@ void ThreadFactory::create_thread(int i, _Callable fn) {
82
82
threads_[i] = std::thread (fn);
83
83
}
84
84
85
- void ThreadFactory::spawn_event_worker (int i) {
85
+ void ThreadFactory::spawn_event_worker (WorkerId i) {
86
86
create_thread (i, [=]() {
87
87
swoole_set_process_type (SW_PROCESS_EVENTWORKER);
88
88
swoole_set_thread_type (Server::THREAD_WORKER);
@@ -96,7 +96,7 @@ void ThreadFactory::spawn_event_worker(int i) {
96
96
});
97
97
}
98
98
99
- void ThreadFactory::spawn_task_worker (int i) {
99
+ void ThreadFactory::spawn_task_worker (WorkerId i) {
100
100
create_thread (i, [=]() {
101
101
swoole_set_process_type (SW_PROCESS_TASKWORKER);
102
102
swoole_set_thread_type (Server::THREAD_WORKER);
@@ -120,7 +120,7 @@ void ThreadFactory::spawn_task_worker(int i) {
120
120
});
121
121
}
122
122
123
- void ThreadFactory::spawn_user_worker (int i) {
123
+ void ThreadFactory::spawn_user_worker (WorkerId i) {
124
124
create_thread (i, [=]() {
125
125
Worker *worker = server_->user_worker_list .at (i - server_->task_worker_num - server_->worker_num );
126
126
swoole_set_process_type (SW_PROCESS_USERWORKER);
@@ -134,7 +134,7 @@ void ThreadFactory::spawn_user_worker(int i) {
134
134
});
135
135
}
136
136
137
- void ThreadFactory::spawn_manager_thread (int i) {
137
+ void ThreadFactory::spawn_manager_thread (WorkerId i) {
138
138
create_thread (i, [=]() {
139
139
swoole_set_process_type (SW_PROCESS_MANAGER);
140
140
swoole_set_thread_type (Server::THREAD_WORKER);
0 commit comments