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

System.Concurrency.channelGet is hard to use and too coupled into scheme support code #3424

Open
jarlah opened this issue Nov 24, 2024 · 2 comments

Comments

@jarlah
Copy link

jarlah commented Nov 24, 2024

I hope its appropriate that i create an issue for this.

I am trying to get idris2-http "up and running" in the sense that i can use it in a real world scenario. Currently it only supports normal transfer encoding. It doesnt support chunked transfer encoding, due to how channels are implemented in base lib.

i have an issue with reproducible code here idris-community/idris2-http#15. Its a bit high level, but i dont think its very hard to spot where the problem is: in the scheme support code. Its not implemented to work the way i want it to work.

Steps to Reproduce

Run the example in the linked PR. its a standard pack project. I use repl. Should be no different since i use :exec. I like to inspect types.

Expected Behavior

I dont get stuck waiting for more data when there is more data to fetch.

Observed Behavior

It gets stuck when waiting for more data, when calling channelGet channel. But i honestly think it needs to be redesigned if it should work differently.

@gallais
Copy link
Member

gallais commented Nov 24, 2024

Looks to me like you could maybe have a variant of blodwen-channel-get that does not use
channel-get-while-helper and returns Nothing if either the mutex could not be acquired or
the box was empty.

@Matthew-Mosior
Copy link
Contributor

I'm taking a look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants