fnproject/fn

How are the parameters passed between the flow functions?

CodingYuanLiu opened this issue · 0 comments

Hi, I want to have some additional knowledge about the implementation of the fn flow.
With the help of the fn flow, it's easy for me to, for example, construct a "function chain", which means that function f1 will be invoked first, and then f2 will be invoked with f1's return value, then f3...

So, how are the parameters passed between the flow functions? In other words, how does the return value of f1 go to f2? I have tried to let function f1 return a super large result to f2, but the communication time (the time interval between the return of f1 and the start of f2) does not even increase.

I just want to ask how to explain the phenomena? Does f1 just return a pointer of the returned object to f2? Will anything like memory copy from f1 to f2 occur?

Thanks.