I´m trying to use the API, but I am having some kind of Deadlock problem.
When executing the simple example bellow, the program gets stuck at line 7 waiting for the completion response. Can you give any advice of how can I solve this?
4 // Simple output from console
5 Console.WriteLine("Arbitrary R code:");
6 var result = session.ExecuteAndOutputAsync("Sys.info()");
7 result.Wait();
8 Console.WriteLine(result.Result.Output);
Hi there, how you doing?
I´m trying to use the API, but I am having some kind of Deadlock problem. When executing the simple example bellow, the program gets stuck at line 7 waiting for the completion response. Can you give any advice of how can I solve this?
Thanks
1 IRHostSession session = RHostSession.Create("Test"); 2 Task sessionStartTask = session.StartHostAsync(new RHostSessionCallback()); 3 sessionStartTask.Wait();
4 // Simple output from console 5 Console.WriteLine("Arbitrary R code:"); 6 var result = session.ExecuteAndOutputAsync("Sys.info()"); 7 result.Wait(); 8 Console.WriteLine(result.Result.Output);