Skip to content

Commit

Permalink
added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alemar11 committed Jun 13, 2024
1 parent c899fe0 commit a1d9ab6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Sources/Core/AsynchronousOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ open class AsynchronousOperation: Operation, ProgressReporting {

// MARK: - Public Methods

/// The default implementation of this method does nothing.
/// The default implementation of this method does nothing.
/// You should override this method to perform the desired task. In your implementation, do not invoke super.
/// This method will automatically execute within an autorelease pool provided by Operation, so you do not need to create your own autorelease pool block in your implementation.
/// This method will automatically execute within an autorelease pool provided by `Operation`, so you do not need to create your own autorelease pool block in your implementation.
/// - Note: Once the task is finished you **must** call `finish()` to complete the execution.
/// - Warning: It won't be called if the operation gets cancelled before starting.
open override func main() {
preconditionFailure("Subclasses must implement `main()`.")
}
Expand Down
3 changes: 1 addition & 2 deletions Tests/AdvancedOperationTests/Helpers/Mocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ internal final class DummyResultOperation: ResultOperation<String, DummyResultOp

override func cancel() {
if setFailureOnEarlyBailOut {
// makes sure that, even if the operation is cancelled before getting executed,
// there always be a result when it finishes
// makes sure that, even if the operation is cancelled before getting executed, there is a result when it finishes
cancel(with: .cancelled)
} else {
super.cancel()
Expand Down

0 comments on commit a1d9ab6

Please sign in to comment.