Skip to content

Commit

Permalink
update thread-safety docs on Storage (#11661)
Browse files Browse the repository at this point in the history
  • Loading branch information
morganchen12 authored Aug 8, 2023
1 parent d4beb34 commit 7ad4967
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion FirebaseStorage/Sources/Storage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import FirebaseAuthInterop
/**
* Firebase Storage is a service that supports uploading and downloading binary objects,
* such as images, videos, and other files to Google Cloud Storage. Instances of `Storage`
* are not thread-safe.
* are not thread-safe, but can be accessed from any thread.
*
* If you call `Storage.storage()`, the instance will initialize with the default `FirebaseApp`,
* `FirebaseApp.app()`, and the storage location will come from the provided
Expand Down
1 change: 0 additions & 1 deletion FirebaseStorage/Sources/StorageDownloadTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import Foundation
* Downloads can currently be returned as `Data` in memory, or as a `URL` to a file on disk.
* Downloads are performed on a background queue, and callbacks are raised on the developer
* specified `callbackQueue` in Storage, or the main queue if left unspecified.
* Currently all downloads must be initiated and managed on the main queue.
*/
@objc(FIRStorageDownloadTask)
open class StorageDownloadTask: StorageObservableTask, StorageTaskManagement {
Expand Down
1 change: 0 additions & 1 deletion FirebaseStorage/Sources/StorageObservableTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import Foundation
* in task state.
* Observers produce a `StorageHandle`, which is used to keep track of and remove specific
* observers at a later date.
* This class is not thread safe and can only be called on the main thread.
*/
@objc(FIRStorageObservableTask) open class StorageObservableTask: StorageTask {
/**
Expand Down
2 changes: 1 addition & 1 deletion FirebaseStorage/Sources/StorageTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import Foundation
* for metadata and errors.
* Callbacks are always fired on the developer-specified callback queue.
* If no queue is specified, it defaults to the main queue.
* This class is not thread safe, so only call methods on the main thread.
* This class is thread-safe.
*/
@objc(FIRStorageTask) open class StorageTask: NSObject {
/**
Expand Down
1 change: 0 additions & 1 deletion FirebaseStorage/Sources/StorageUploadTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import Foundation
* Uploads can be initialized from `Data` in memory, or a URL to a file on disk.
* Uploads are performed on a background queue, and callbacks are raised on the developer
* specified `callbackQueue` in Storage, or the main queue if unspecified.
* Currently all uploads must be initiated and managed on the main queue.
*/
@objc(FIRStorageUploadTask) open class StorageUploadTask: StorageObservableTask,
StorageTaskManagement {
Expand Down

0 comments on commit 7ad4967

Please sign in to comment.