Firebase功能:调用顺序(Firebase functions: sequence of calls)

编程入门 行业动态 更新时间:2024-10-26 23:41:01
Firebase功能:调用顺序(Firebase functions: sequence of calls)

Firebase是否会串行进行异步调用?

我有两个电话,如下所述。 第二个电话可能比第一个电话早完成吗?

var p1 = admin.database().ref(path1).set(value1); var p2 = admin.database().ref(path2).set(value2); return Promise.all([p1, p2]);

Does Firebase proceed async calls in series or not?

I have two calls as mentioned below. Is it possible that 2nd call going to finish early than 1st one?

var p1 = admin.database().ref(path1).set(value1); var p2 = admin.database().ref(path2).set(value2); return Promise.all([p1, p2]);

最满意答案

对于实时数据库,不,对于您显示的情况不可能。 这些操作将按照它们执行的顺序完成。

For Realtime Database, no, it is not possible for the case you've shown. The operations will complete in the order they were executed.

更多推荐

本文发布于:2023-08-02 16:27:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1378608.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:顺序   功能   Firebase   calls   sequence

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!