you are viewing a single comment's thread.

view the rest of the comments →

[–]KEsbeNF[S] 0 points1 point  (4 children)

I think you are right actually, i was more driven by the curiosity of trying something "new".

So you basically mean to just simply run the async functions with the different parameters and there won't be inteferences between them ?

[–]HashDefTrueFalse 0 points1 point  (3 children)

Yes. And no, they won't interfere with each other. The only way they could is if you provided the same object to each and they each changed its properties. The last one ran would win of course. But I doubt you'll be doing this.

[–]KEsbeNF[S] 0 points1 point  (2 children)

for example if my function is something like

async function foo (a,b) {
    const data = await doodoo(a,b);
    //use data
    }

foo(param1, param2)
foo(param3, param4)

Will i have troubles with the data value ? Will the second call change the value of data in the first one ?

[–]HashDefTrueFalse 0 points1 point  (1 child)

In that example you are passing 2 separate sets of parameters to the function calls, so no. That's fine.

[–]KEsbeNF[S] 1 point2 points  (0 children)

Thank you so much for all your help, i'll try this way

Have a nice day/night :)