-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add call_semantics
option to select call command code
#9
Conversation
The old (0x06) returns a table with the return values of the function call, where each value is wrapped in an array. The new command returns a table that contains the values unwrapped. This saves table allocations, thus creating less unnecessary work for the garbage collector.
On the technical side it's all implemented; however, I'm not at all happy with the new methods name Another name I considered was Another option would be to add an option to the creation of the object, something like db = tarantool:new {
user = 'foo'
-- ...
wrap_call_results = false;
} where Either way, my opinion is that this should be the default behavior for |
I just changed it so now there's only I propose adding it to the readme example with a warning that the default will change in the future, and it should be set manually to |
ncall
method for new (0x0a) call commandcall_semantics
option to select call command code
I think this is the least annoying way of implementing it and it seems to work pretty well for me. Some additional testing would of course be a good idea, but for me it seemed to work without bugs. |
Also, for now I added a warning that the default value of "old" may change at some point; if you already know whether you actually want to change that, you could change it to will (or just leave it the way it is) |
I will merge it and test it myself this week. Danke. |
The old (0x06) returns a table with the return values of the function
call, where each value is wrapped in an array. The new command returns a
table that contains the values unwrapped.
This saves table allocations, thus creating less unnecessary work for
the garbage collector.
see also: #8