Skip to content

Instantly share code, notes, and snippets.

@Otbivnoe
Created September 13, 2017 05:27
Show Gist options
  • Select an option

  • Save Otbivnoe/a91d7ca477b30a26aa6be0514d499185 to your computer and use it in GitHub Desktop.

Select an option

Save Otbivnoe/a91d7ca477b30a26aa6be0514d499185 to your computer and use it in GitHub Desktop.
/// Respresents a disposable resource.
public protocol Disposable {
func dispose()
}
/// Represents disposable resource with state tracking.
public protocol Cancelable: Disposable {
var isDisposed: Bool { get }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment