Skip to content
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

Add types to task.py #1254

Merged
merged 4 commits into from
Jul 28, 2024
Merged

Add types to task.py #1254

merged 4 commits into from
Jul 28, 2024

Conversation

InvincibleRMC
Copy link
Contributor

No description provided.

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have one comment to confirm. i would like to request another review.

"""
Schedule done callbacks on the executor if possible, else run them directly.

This function assumes self._lock is not held.
"""
with self._lock:
assert self._executor is not None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this check is required here? i think this could be None.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe if self._executor is None then an error of 'NoneType' object is not callable would occur with the line executor = self._executor()

@@ -174,6 +173,7 @@ def add_done_callback(self, callback):
invoke = False
with self._lock:
if self._done:
assert self._executor is not None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, could be None?

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I'm going to go ahead and rebase it onto the latest, since it will certainly need that in order to pass CI.

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
@clalancette
Copy link
Contributor

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@clalancette clalancette merged commit 573d9c8 into ros2:rolling Jul 28, 2024
3 checks passed
@InvincibleRMC InvincibleRMC deleted the tasks branch July 28, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants