theRainbird/CoreRemoting

Is it possible to call Async methods from server?

Closed this issue · 2 comments

I made a simple test for async method, which creates a text file
but it's test call went to some infinite and never ending work ..

Text file successfully created, but test never stops executing

Is it possible to call Async methods from server? or maybe there's some hidden pitfalls?

server

public async Task<T> GetValueAsync<T>(T arg)
{
    await File.WriteAllTextAsync("test.txt", "test");
    return arg;
}

client

var proxy = client.CreateProxy<ISayHelloService>();
var res = proxy.GetValueAsync("Hello").Result;

Currently async calls are not implemented.
But I will implement it soon, because it will be very useful.

Async methods can now be called remotely (see 5a52405).

The async feature is also included in the new NuGet package version 1.1.13.