I would like to know what is the difference between
public Task<string> MyString()
{
....
}
And
public string MyString()
{
....
}
Is it safer to use Task on the server-side when multiple users run it in the same time? By "safer" I mean situation when I have a login logic in that function which returns an ID to a client (WPF) side. This logic is basically adding to cache dictionaries (ConcurrentDictionary). So is it possible that using the second option my server will be blocked when multiple users will run it at the same time? Thanks.