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

unify send_request and send_command #370

Closed
shashi opened this issue Dec 22, 2019 · 1 comment
Closed

unify send_request and send_command #370

shashi opened this issue Dec 22, 2019 · 1 comment

Comments

@shashi
Copy link
Member

shashi commented Dec 22, 2019

I want to use evaljs in a fire and forget kind of way. I'm trying to send 1000s of these in a for loop, it works blazing fast if I just remove the code that sets up the future and the waiting tasks but of course prints a ton of "Warning: response received for unknonwn....".

Ideally, send_command would just be something like send_request(blah...; async=true) and evaljs can take async as an argument which it forwards to send_request.

Cheers

@twavv
Copy link
Member

twavv commented Dec 26, 2019

Closed in favor of #371/#372.

tl;dr:

  • command is fire-and-forget
  • request sets up the tasks and futures
  • Individual functions can choose the appropriate message type.
  • evaljs has can be called with result=true to use a request, but the default is to use a command (especially since this is the "safer" option)

@twavv twavv closed this as completed Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants