Skip to content

Conversation

hmelder
Copy link
Member

@hmelder hmelder commented Oct 13, 2025

The cancellable property is merely an indicator for the user and appears to not restrict actual cancelation of a progress.

On macOS, one can set cancellable to false and still cancel a progress. Therefore, we only mutate the internal variable and do not alter the behaviour of -cancel.

The cancellable property is merely an indicator for the user and appears to not
restrict actual cancelation of a progress.

On macOS, one can set cancellable to false and still cancel a progress. Therefore,
we only mutate the internal variable and do not alter the behaviour of -cancel.
@hmelder hmelder requested a review from rfm as a code owner October 13, 2025 11:03
@hmelder hmelder force-pushed the nsprogress-cancelation branch from df79184 to 766ba44 Compare October 13, 2025 11:40
Copy link
Contributor

@rfm rfm left a comment

Choose a reason for hiding this comment

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

Unfortunately this seems rather unclear. My reading of the Apple documentation suggests two possibilities:

  1. we are looking at a bug in the Apple implementation; if so it might be fixed in a later release and we should not be copying it, in which case we should not be making this change.
  2. the apple documentation is unclear; in which case we need to improve this PR by making our documentation extremely clear, and possibly by adding more work. The only interpretation I can see by which the Apple implementation is not simply buggy, is if isCancellable refers solely to the underlying work whose progress is being shown, but -cancel and -cancelled refer only to the operation of the indicator, not the underlying work. If that interpretation is correct, in addition to extensive clarification of that point in the documentation, we need to be sure about what -cancel should do when -isCancellable returns NO. Should the handler be called?

@hmelder
Copy link
Member Author

hmelder commented Oct 15, 2025

The documentation does not specify any side-effects on progress cancelation. I'm not sure what the original intent of this property is, but given the behaviour on macOS, it appears to be only an indicator checked by the user before calling -cancel. That being said, this could be a bug on apple's side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants