Type Method 型メソッド

current()

Returns the progress instance, if any. 進捗インスタンスを返します、もしあれば。

Declaration 宣言

class func current() -> Progress?

Return Value 戻り値

The progress instance for the current thread, if any.

Discussion 議論

If you invoke becomeCurrent(withPendingUnitCount:) on the current thread, this method returns the progress instance.

Use this per-thread current() value to allow code that performs work to report useful progress even when it’s widely separated from the code that actually presents progress information to the user, and without requiring layers of intervening code to pass around an Progress instance.

To ensure that you report progress in known units of work, you typically work with a suboperation progress object that you create by calling discreteProgress(totalUnitCount:).

See Also 参照

Accessing the Current Progress Object 現在の進捗オブジェクトにアクセスする