-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename task_id to group_id because WorkerThreadPool.wait_for_group_task_completion returns a grouped task #91983
base: master
Are you sure you want to change the base?
Conversation
Rename task_id to group_id to conform to the parameter name for WorkerThreadPool.wait_for_group_task_completion
Please update the title to reflect what is being done Also the c# code should be updated as well I'm not sure about this though, the returned value is "group task ID" so it's more correct to call it a task id than a group id in my opinion, so if anything it should be |
@@ -74,15 +74,15 @@ | |||
</method> | |||
<method name="get_group_processed_element_count" qualifiers="const"> | |||
<return type="int" /> | |||
<param index="0" name="group_id" type="int" /> | |||
<param index="0" name="group_task_id" type="int" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You used find/replace and replaced too much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this should be renamed.
"group task with the given ID" == "group_task_id", no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No that's outside the scope of this, please restore, this is just for documentaiton
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the C# too, using groupTaskId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure are these the changes you're looking for? (worker_thread_pool.cpp)
ClassDB::bind_method(D_METHOD("is_group_task_completed", "group_task_id"), &WorkerThreadPool::is_group_task_completed);
ClassDB::bind_method(D_METHOD("get_group_processed_element_count", "group_task_id"), &WorkerThreadPool::get_group_processed_element_count);
ClassDB::bind_method(D_METHOD("wait_for_group_task_completion", "group_task_id"), &WorkerThreadPool::wait_for_group_task_completion);
I couldn't find any csharp files with group_id, groupId or groupTaskId.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No not at all, don't change these parts, just the documentation right here, this part:
long taskId = WorkerThreadPool.AddGroupTask(Callable.From<int>(ProcessEnemyAI), _enemies.Count);
// Other code...
WorkerThreadPool.WaitForGroupTaskCompletion(taskId);
Rename task_id to group_id to conform to the parameter name for WorkerThreadPool.wait_for_group_task_completion