Page 1 of 1

Asynchronous Method Calls

Posted: 11 Aug 2020, 12:47
by falko.wiese
Moin,
is there any support for asynchronous method calls in the SDK? Maybe an implementation of "..beginCall()" where I can return the status code of it and - in another thread - execute the method and call "..finishCall()"? At least with my SDK (version 1.4.3) it fails with an "Access Violation" for my 'user object', which is directly related to the MethodHandleNode object from an UA server tree.

Cheers,
Falko.

Re: Asynchronous Method Calls

Posted: 19 Aug 2020, 08:18
by uasdkcpp
Hello Falko,

yes you can process Methods in an asynchronous manner. Actually that is the default. If you implement your MethodManager you can start the operation in beginCall and start processing the method in a worker thread.
Once the operation is completed you would call finishCall to pass the results to the SDK.
You can not return the status immediately and then start processing the business logic for that method. You would then have no way to return output arguments or errors if something fails.