-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
async await 2 #148
async await 2 #148
Conversation
@lewis6991 @RianFuro @mfussenegger breaking changes! changesremove
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main thing we should decide is how to transition from current async_lib to new async_lib. I don't want two async libs in the same repo :)
What are your thoughts for that?
The reason I have two libraries is because if I were to delete the old async library it would be a pain to develop because I use both |
Yeah, I understand we don't want to break their code right now, but since the two pieces of code are not compatible, there is no reason to model Additionally, we should think of some way to transition these to a different version, for example, |
Yes I understand. I have removed all the compatibility. Are you saying you want me to change the name to |
lua/plenary/async_lib2/async.lua
Outdated
step() | ||
end | ||
|
||
local add_leaf_function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing I thought here was you might run into problems if people do something like require('plenary.async')
vs. require('plenary/async')
-- this will give you two different local tables. You may want to do the trick we do other places of using a global and local leaf_table = _PlenaryLeafTable
etc.
lua/plenary/async_lib2/control.lua
Outdated
|
||
sent = true | ||
|
||
local args = {...} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can probably do this without storing args into a table, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it so it won't store into table for zero or one args, other than that I think it has to store into a table
Was using async_lib which is effectively deprecated, this API provides better performance - interesting PR nvim-lua/plenary.nvim#148
No description provided.