fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

11K
active users

To async or not to async?

How would you define a library interface for a service that probably will be implemented with an in memory procedure - let's say returning a mapped value to a key you registered programmatically - and a user of your API might want to implement a decorator that needs a 'long running task' - for example you want to log a msg into your db or load additional mapping from a file?

Would you define the interface to return a Task<string> or just a string?

Fandermill

@ploeh Thank you for your article, such an interesting read!

I went with the notion that it's easier to make it async afterwards than the other way around. And by extend also being conservative about what you send.

Thanks!