-
Notifications
You must be signed in to change notification settings - Fork 246
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 might export isfull
in non-breaking release
#894
Comments
Can you make that a PR? I think all you need is: if isdefined(Base, :isfull)
import Base: isfull
end |
This might qualify as punning. The docstring for EDIT: Maybe this comment should have been on PR #896. |
I am not familiar with the concept of "punning", but you do have a point. However I feel as if the meaning of |
"Punning" is using the same generic function in two different contexts with two different meanings. "Is full?" seems clear enough, but it would still need a docstring with a generic definition. However, you have to ask yourself if there are ever any circumstances where it makes sense to write a generic function function foo(x)
# ...
... isfull(x) ...
# ....
end that works on both All that being said, the name |
A CircularBuffer (either bounded or unbounded) would be a reasonable implementation choice for the Channel (single or multi-threaded) |
Yes. A CircularBuffer is basically the textbook solution to implementing Channels. (I profiled changing the implementation to one back in julia v0.5 days, didn't work out faster) |
Ok, sorry for the noise. |
I think technically it is a space savings not a time savings, as you can fit the same sized queue performance in half the memory with a circular buffer implementation |
I will close this up, as the issue is (currently being) delt with by #896. |
I just submitted this PR to julia base, which will be breaking for DataStructures.jl if merged.
In order to maintain compatability with both 1.10 and 1.11, I propose we implement something like the following:
The text was updated successfully, but these errors were encountered: