You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When VRPC is used to embed C/C++ libraries to be called by e.g. a local Node.js client and the embedded C++ functions are of synchronous (blocking) nature, users typically encounter a problem. Those function calls when executed by the (local) VRPC client will block the main thread and hence - in Node.js - the main event-loop. This is a performance killer for the rest of the client application. Today, users must workaround themselves by wrapping those calls into threads which ship their data back onto the clients' application event-loop (libuv in case of Node.js).
Describe the solution you'd like
VRPC should provide a simple option that - when enabled - automatically executes (selected or all?) functions asynchronously, obsoleting the need for the user to implement any additional threading code. Function that are bound this way should automatically manifest themselves as asynchronous functions (i.e. return a Promise) on the client as well and be executable with a simple await statement.
Describe alternatives you've considered
An alternative could be to use potentially available threading features of the client application on such functions.
Additional context
Most certainly such an enhancement must be done in the addon.cpp (Node.js) and module.cpp (Python3) files. The underlying technology should make use of a second event-loop - using the same technology as already implemented on the stand-alone C++ agents (i.e. asio and friends)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When VRPC is used to embed C/C++ libraries to be called by e.g. a local Node.js client and the embedded C++ functions are of synchronous (blocking) nature, users typically encounter a problem. Those function calls when executed by the (local) VRPC client will block the main thread and hence - in Node.js - the main event-loop. This is a performance killer for the rest of the client application. Today, users must workaround themselves by wrapping those calls into threads which ship their data back onto the clients' application event-loop (libuv in case of Node.js).
Describe the solution you'd like
VRPC should provide a simple option that - when enabled - automatically executes (selected or all?) functions asynchronously, obsoleting the need for the user to implement any additional threading code. Function that are bound this way should automatically manifest themselves as asynchronous functions (i.e. return a
Promise
) on the client as well and be executable with a simpleawait
statement.Describe alternatives you've considered
An alternative could be to use potentially available threading features of the client application on such functions.
Additional context
Most certainly such an enhancement must be done in the
addon.cpp
(Node.js) andmodule.cpp
(Python3) files. The underlying technology should make use of a second event-loop - using the same technology as already implemented on the stand-alone C++ agents (i.e.asio
and friends)The text was updated successfully, but these errors were encountered: