mattwelke commented on a change in pull request #50:
URL:
https://github.com/apache/openwhisk-runtime-dotnet/pull/50#discussion_r616275903
##########
File path: core/dotnet2.2/QUICKSTART.md
##########
@@ -19,12 +19,20 @@
# Quick .NET Core 2.2 Action
-A .NET Core action is a .NET Core class library with a method called `Main`
that has the exact signature as follows:
+A .NET Core action is a .NET Core class library with a method called `Main` or
`MainAsync` that has the exact signature as follows:
Review comment:
Isn't this just a .NET convention, that async methods should end in
"Async"?
(https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/task-asynchronous-programming-model)
I'd argue that that should be up to the OpenWhisk user. In the end, I
imagine the usefulness of this convention is that people writing code and using
this function will see right away that it returns `Task` or `Task<T>`. In this
case, they're coding a function that the runtime will use, so they don't get
any value out of following that convention.
Right now, the runtime detects whether it needs to await the method, and if
so, it does. This means the quickstarts before this PR can be used whether the
user function is async or sync, and they're simpler that way because the user
doesn't need to worry about following different paths depending on if they're
writing an async or sync Main method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]