1

Team,

I don't know the difference between Async.function and Async.procedure

Let me know when to use where

Maxim Fateev
  • 6,458
  • 3
  • 20
  • 35

1 Answers1

0

Async.function can return a value but Async.procedure doesn't.

Also, Functions.Func1 allow to pass a parameter, Functions.Func2 allow to pass two parameters, etc

Long Quanzheng
  • 2,076
  • 1
  • 10
  • 22
  • we can pass a maximum of 6 params in both Async.Function and Async.procedure right ? Why did it fix as 6? – Anil Kumble May 15 '21 at 17:46
  • It's just a limitation in Java functional programming. To have more, we have to define those interfaces which is a bit tedious and we have to stop at a certain number. And also it's not a good practice to have too many parameters, we just pick 6. You should pass in an wrapper of more parameters as a workaround. – Long Quanzheng May 15 '21 at 17:51