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

coroutine.yield should stay infinitely yielding until the thread is resumed #298

Open
sasial-dev opened this issue Jan 25, 2025 · 1 comment
Labels
bug Something isn't working needs information / investigation Issue is missing information to be able to be solved

Comments

@sasial-dev
Copy link
Contributor

coroutine.yield should stay infinitely yielding until the thread is resumed, an example can be found in this simple repro:

#[tokio::test]
async fn test_yield() {
    let mut runtime = lune::Runtime::new();
    runtime.run("zap", "coroutine.yield()").await.unwrap();
}

I reproduced this off master:

[dependencies]
# current master commit at the time of writing this issue
lune = { git = "https://github.com/lune-org/lune.git", rev = "5d1401cdf611cc9f215f03bdf16ada0e77717edf" }
tokio = { version = "1", features = ["full"] }

This has stopped us from having e2e testing for zap so far as the coroutine should stay yielding until it "receives" data.

@filiptibell filiptibell added bug Something isn't working needs information / investigation Issue is missing information to be able to be solved labels Mar 24, 2025
@filiptibell
Copy link
Collaborator

I'm actually unsure why this happens. Expected behavior would indeed be for runtime.run("...", "coroutine.yield()").await to yield indefinitely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs information / investigation Issue is missing information to be able to be solved
Projects
None yet
Development

No branches or pull requests

2 participants