简体   繁体   English

使主挂起

[英]Make main suspend

In the official documentation for kotor , when creating a client, it is written to use suspend.kotor的官方文档中,创建客户端时,写的是使用suspend。 enter image description here在此处输入图像描述

But I do not have such an item in the menu.但是我的菜单中没有这样的项目。 What needs to be done?需要做什么? enter image description here Why do I need to use suspend at all when calling the kotor method? enter image description here为什么我在调用 kotor 方法时需要使用 suspend?

You need to add the keyword suspend to the call function.您需要在调用 function 时添加关键字 suspend。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 协程 - 避免使用暂停 function - Coroutine - Avoiding using Suspend function 错误:类中的 Main 方法不是静态的。 科特林项目 - Error: Main method is not static in class. Kotlin Project Kotlin 多平台 - “错误:无法找到或加载主类 MainKt” - Kotlin Multi-Platform - “Error: Could not find or load main class MainKt” 为什么我需要将 main function 放在我的 kotlin 多平台项目的 jvmMain 中? - Why I need to place main function in jvmMain in my kotlin multiplatform project? 如何使 Kotlin Multiplatform 与 Android Studio 的项目视图一起使用? - How to make Kotlin Multiplatform work with Android Studio's project view? 如何为 iOS 制作多模块 kotlin 多平台库? - How to make a multi-module kotlin multiplatform library for iOS? 如何在Kotlin Multiplatform(纯kotlin)中延迟 - How to make a delay in Kotlin Multiplatform (pure kotlin) 如何使 Ios 应用程序的依赖项项目可见? - How to make dependency project visible for Ios app? 在 Kotlin Compose Desktop 中,如何使 Enter 键移动焦点? - How do you make the Enter key move focus in Kotlin Compose Desktop? 如何使我的JS测试出现在Kotlin Multiplatform项目中 - How to make my JS tests appear in Kotlin Multiplatform project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM