Rename callSyncifying to callPromising, add callWithOptions #4608
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since we renamed
syncify
the method namecallSyncifying
doesn't make much sense anymore. It is implemented in terms of a so-calledpromising
wasm call, so this lines up with that. OTOH:suspendableCall
would be more appropriate?We now have three boolean parameters for a Js-to-Python call:
So we'd need 8 functions to cover all combinations of these. Currently we only have 6 of these. Rather than adding the two remaining combinations which will have annoying names, I added
callOptions
which takes an options argument as the first argument. Despite the fact that options usually go as the last argument, I think it makes sense to use the first argument for this so that all remaining args are passed on to Python. There's also a suggestion of adding a timeout parameter #4537 which this would reasonably accomodate.Is
callOptions
a good name? @rth @ryanking13 anyone have thoughts on names (or anything else)?Checklist