Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for asynchronous calls #377

Open
SanderMertens opened this issue Oct 24, 2015 · 0 comments
Open

Support for asynchronous calls #377

SanderMertens opened this issue Oct 24, 2015 · 0 comments

Comments

@SanderMertens
Copy link
Member

Since function calls in Corto can be executed on a remote node, having to do a blocking wait for a response (in order to mimic 'traditional' function behavior) could hurt application performance. To address this, Corto should support calling functions asynchronously.

It would be nice if the user could decide whether to call a certain function asynchronously or not. Therefore, the language binding should allow for an extra way to call a method asynchronously. For example, the following corto definition:

int32 add(int32 a, int32 b)

could result in the following generated code (simplified- not showing casting macro's):

void add_async(corto_int32 a, corto_int32 b, corto_int32Callback callback);

Another option could be to allow for the function result to be posted to a dispatcher:

void add_dispatch(corto_int32 a, corto_int32 b, corto_int32Callback callback, corto_dispatcher dispatcher);

The latter would be more flexible, since it would allow the result of the function to be dispatched to a specific thread.

@SanderMertens SanderMertens added this to the alpha 0.3.0 milestone Oct 24, 2015
@SanderMertens SanderMertens removed this from the alpha 0.3.0 milestone Feb 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant