You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.2 KiB

5 years ago
  1. /**
  2. Copyright 2018 Google Inc. All rights reserved.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at:
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. #import "FBLPromise.h"
  14. NS_ASSUME_NONNULL_BEGIN
  15. /**
  16. Waits for promise resolution. The current thread blocks until the promise is resolved.
  17. @param promise Promise to wait for.
  18. @param error Error the promise was rejected with, or `nil` if the promise was fulfilled.
  19. @return Value the promise was fulfilled with. If the promise was rejected, the return value
  20. is always `nil`, but the error out arg is not.
  21. */
  22. FOUNDATION_EXTERN id __nullable FBLPromiseAwait(FBLPromise *promise,
  23. NSError **error) NS_REFINED_FOR_SWIFT;
  24. NS_ASSUME_NONNULL_END