Backend to frontend rpc call

Hi all,

In my custom theia, I’m able to call the backend method and frontend. Using await while calling the backend method ensures that the call waits till it returns from the backend.

I’m also calling the frontend method from backend (similar to events from backend to frontend in theia). So, when calling the frontend method, can backend method use await to wait for the frontend method to return ?

calling the frontend method from the backend as follows doesnt wait for the method to return:
await this.client.onPerformAction();

I tried this but, await didnt help. Kindly help.

Bad luck. There is special logic for methods prefixed with on or notify where the call is sent as a notification, which doesn’t wait for a response because none is expected.


Solution is to rename your methods that expect a response to not include those prefixes.

Thank you, @paul-marechal, I shall try this.