From cd10b8854fe6a8fdeb10d4c716e5717a4d53a471 Mon Sep 17 00:00:00 2001 From: zhouwenxuan Date: Wed, 3 Apr 2024 09:02:52 +0800 Subject: [PATCH] Add interface to check whether it is a concurrent function issue: https://gitee.com/openharmony/interface_sdk-js/issues/I94BSE Signed-off-by: zhouwenxuan --- api/@ohos.taskpool.d.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/api/@ohos.taskpool.d.ts b/api/@ohos.taskpool.d.ts index cf5871c2d..ba181cdfb 100644 --- a/api/@ohos.taskpool.d.ts +++ b/api/@ohos.taskpool.d.ts @@ -1078,6 +1078,19 @@ declare namespace taskpool { * @since 12 */ function terminateTask(longTask: LongTask): void; + + /** + * Check if the function is a concurrent function. + * + * @param { Function } func - The function name to check. + * @returns { boolean } Returns {@code true} if it is a concurrent function; returns {@code false} otherwise. + * @throws { BusinessError } 401 - The input parameters are invalid. + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 12 + */ + function isConcurrent(func: Function): boolean; } export default taskpool;