Skip to content

importer: honor context cancellation during walk#16

Open
glemmaPaul wants to merge 2 commits into
mainfrom
glemmaPaul/use-ctx-error
Open

importer: honor context cancellation during walk#16
glemmaPaul wants to merge 2 commits into
mainfrom
glemmaPaul/use-ctx-error

Conversation

@glemmaPaul
Copy link
Copy Markdown

No description provided.

@glemmaPaul glemmaPaul requested a review from ericfaurot May 6, 2026 15:23
Copy link
Copy Markdown
Contributor

@omar-polo omar-polo left a comment

Choose a reason for hiding this comment

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

lgtm. but this made me realize: what if instead of checking for cancellation in SFTPWalk callback we actually check it in SFTPWalk itself?

Because otherwise this, while correct imho, looks a bit racy since we're checking twice for cancellation in the walk callback (ctx.Err() returns non-nil after cancellation happens).

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.

2 participants