-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
plenary.async.uv: Attempt to yield across C-call boundary #252
Comments
Same error with: > nvim --clean \
--cmd set\ rtp+=/Users/antonparkhomenko/.local/share/nvim/site/pack/packer/start/plenary.nvim \
--cmd ":lua require('plenary.async').uv.fs_open('/Users/antonparkhomenko/.zshrc', 'r', 438)" And even if I run it with 0.4.4 I get:
|
chuwy
changed the title
Attempt to yield across C-call boundary
plenary.async.uv: Attempt to yield across C-call boundary
Oct 6, 2021
I can reproduce this
|
Async functions must be called from an async context or with local a = require("plenary.async")
-- `read` is an async function
read = function(path)
local err, fd = a.uv.fs_open(path, "r", 438)
assert(not err, err)
end
a.run(function() read("mypath") end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm starting to write a very minimalistic plugin with
async
example from README. Basically there's onlyinit.lua
file with:But it fails with the following error, whenever I try to call the function:
Although in fact I see the same error even when call it directly:
:version
output:The text was updated successfully, but these errors were encountered: