Open ghost opened 6 years ago
PoseContext doesn't support specifying async delegates directly. The best thing to do will be to create a separate async method and pass that to PoseContext. E.g.
public async void SomeMethodAsync()
{
Task.Run(() => {});
}
PoseContext(() => SomeMethodAsync());
@tonerdo Looks like it doesn't support async full stop. Specifying an async method to pass to the Isolate method or returning a Task.Run that runs an async delegate from that method results in a compiler error. The only way I found to get this to work was to remove any asynchronous calls and hit the entry point synchronously. Not ideal, but it works I guess.
+1 👍
Is this bug fixed ???
Any update on this?
For support for async/await please see https://github.com/Miista/pose/issues/12
cc: @tonerdo @norgor @Yullissa @ypedroo @bramroelofs-tts
How on earth are you meant to isolate async calls? I've tried working round the issue with PoseContext.Isolate(async () => {}) and PoseContext.Isolate(() => Task.Run(async () => {})); but both throw compiler errors.
Any guidance/thoughts?