I have briefly touched on that in this ticket http://feedback.arma3.com/view.php?id=16358 but would like to bring this up as a separate issue.
At the moment it works like this:
callExtension -> RVExtension -> callExtension in one swoop.
For a smooth operation RVExtension has to return immediately. But if extension is made to do something meaningful, RVExtension usually takes time and so the only way to deal with this effectively is to start a worker thread inside dll and return immediately. Then create a sqf loop that would call extension until the result is ready to be collected.
Instead if there was another interface added to dll, RVExtensionCallback for example, that would trigger Event Handler "ExtensionReady", that would have removed the awkwardness of dealing with threaded extensions.
Any data sent to RVExtensionCallback would trigger the code attached to "ExtensionReady" event handler.
addMissionEventHandler ["ExtensionReady", {hint _this}]
_this would be string, just like the one you get back from using callExtension command.