-
Notifications
You must be signed in to change notification settings - Fork 380
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
[ base ] Add non-blocking and timeout variants for channelGet #3435
base: main
Are you sure you want to change the base?
Conversation
…g with return values of blodwen-channel-get-non-blocking.
… acquired, or the box is empty.
…ng of channelGetNonBlocking.
…ntheses around let*.
…ty box in blodwen-channel-get-non-blocking.
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'm not really a member of this project, so I can't approve it, but I'll at least provide some initial feedback.
Hopefully this will get some other folks to chime in.
Thank you for taking your time to look this over and provide feedback. |
I'm pretty satisfied with the general shape of this now. I will yield the conversation to more seasoned Idris devs. |
If I understand correctly, you introduced the generic object to/from Scheme conversion because, essentially you need to return a
Both approaches share the advantage, that they don't couple the two functions directly to the Chez runtime and other backends can implement them by providing implementations for the 2 (or 4) Furthermore, it should be possible to implement |
Thank you for your feedback! I will work on implementing alternative 1. Ah I see, I'll work on re-working |
This looks really good now! Thanks for taking the time for this non-trivial rework! |
if i can test this in my idris2-http fork that would be awesome :) i have a test there that just hangs. Hopefully I can rewrite the code to use one of these functions :) |
Yeah I'm super excited for that work and to see it come to fruition! 😃 I think we're just waiting on a core maintainer review/approval/merged 🤞 |
There should be nothing stopping someone from testing this commit against a local build of a fork of some library though, to be clear. |
i might need some help reviewing why it wont build though ... it seems to be both issues with installing idris2-lsp and runniing pack build from my fork of idris2 here jarlah@fa50df7 which i use here https://github.com/idris-community/idris2-http/blob/testing_chunked/pack.toml#L14 when running pack install everything completes. When i run pack build it fails ╰─ pack build some incompabilities between latest main on idris2 and libraries? I got some real nerves doing these kinds of things, because its like swimming in a dark ocean with no land in sight 🤣 luckily i have my tricks to keep me sane :D |
I think you may need to use a different pack snapshot, I would try |
Yes, the WithFC error will be resolved if building the latest of pack’s collection against the latest of the compiler. The relevant compiler change was made last week (followed by fixes for various libraries in pack’s database). |
i just gave to repeat what others have said before .. but seriously .. pack is so god damn good ... it just works .. such things as pack switch latest and pack build .. boom |
@Matthew-Mosior added a test here :) thanks for the tips .. it helped .. so i have full lsp help locally now on idris2 from your branch ;) idris-community/idris2-http#15 (comment) as mentioned there, we might need to do some type aliasing to make the new function work properly (or to comprehend the start request function |
Awesome thanks for trying this out! I'm not by my computer right now, but will take a look asap! |
Description
This PR adds a two new functions in
System.Concurrency
,channelGetNonBlocking
andchannelGetWithTimeout
(only for thechez
backend).Credit to @emdash and @cypheon for review and feedback.
This PR closes #3424.
Should this change go in the CHANGELOG?
implementation, I have updated
CHANGELOG_NEXT.md
(and potentially alsoCONTRIBUTORS.md
).