未验证 提交 256f5d52 编写于 作者: O openharmony_ci 提交者: Gitee

!3274 docs: Modify createrunninglock sample error

Merge pull request !3274 from ShiJie/master
...@@ -109,13 +109,13 @@ Creates a **RunningLock** object. ...@@ -109,13 +109,13 @@ Creates a **RunningLock** object.
``` ```
runningLock.createRunningLock("running_lock_test", runningLock.RunningLockType.BACKGROUND, (error, lockIns) => { runningLock.createRunningLock("running_lock_test", runningLock.RunningLockType.BACKGROUND, (error, lockIns) => {
if (typeof error === "undefined") { if (typeof error === "undefined") {
console.log('create runningLock test error: ' + error);
} else {
var used = lockIns.isUsed(); var used = lockIns.isUsed();
console.info('runninglock is used: ' + used); console.info('runninglock is used: ' + used);
lockIns.lock(500); lockIns.lock(500);
used = lockIns.isUsed(); used = lockIns.isUsed();
console.info('after lock runninglock is used ' + used); console.info('after lock runninglock is used ' + used);
} else {
console.log('create runningLock test error: ' + error);
} }
}) })
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册