wasm接口调用时序问题 #1065
Answered
by
pag-bbs-bot
pag-bbs-bot
asked this question in
Q&A
wasm接口调用时序问题
#1065
-
在对wasm接口封装过程中,调用接口出现时序问题。 wasm接口代码(BannerRootNode是pag的管理类,draw函数会调用pagfile的绘制代码): 输出日志: 我期望js的调用会等待wasm函数运行完成。 我看pagplayer的调用flush方法是(但是我不知道什么样的函数需要这样调用?): async flush(): Promise {
您好, WebAssemblyQueue 是为了解决wasm无法同时执行两个异步函数的问题, 有装饰器wasmAsyncMethod就是需要这样调用的函数
ly.draw中可能包含了回调JS的Promise操作,导致_draw方法变成一个Promise,所以"test finish"先打印出来了 |
Beta Was this translation helpful? Give feedback.
Answered by
pag-bbs-bot
Jun 26, 2023
Replies: 1 comment
-
The above content was transferred from a legacy post on the PAG forum |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
pag-bbs-bot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The above content was transferred from a legacy post on the PAG forum
以上内容搬运来自 PAG 论坛的历史帖子