You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now async functions are hardcoded to always return Task object. This is enough for most cases, but could be better to be able return Task-derived types or just any type that have specified certain members. These members are obvious now:
passing action in constructor
property IsCompleted
method GetAwaiter
It could be even better to specify another optional method:
SetCallParams (Parameters As Dictionary (Of String, Object).
This method may be used to pass arguments provided to calling async function. Alternativelly there may be another keyword (for example AsyncObj), available only in async fynctions, that specify returned object (now Task).
This improvement could be helpful for implementing custom awaiters.
The text was updated successfully, but these errors were encountered:
vbcodec
changed the title
Improving async function
Improving async functions
Jan 7, 2016
For now async functions are hardcoded to always return Task object. This is enough for most cases, but could be better to be able return Task-derived types or just any type that have specified certain members. These members are obvious now:
It could be even better to specify another optional method:
SetCallParams (Parameters As Dictionary (Of String, Object).
This method may be used to pass arguments provided to calling async function. Alternativelly there may be another keyword (for example AsyncObj), available only in async fynctions, that specify returned object (now Task).
This improvement could be helpful for implementing custom awaiters.
The text was updated successfully, but these errors were encountered: