joekain / blockingqueue Goto Github PK
View Code? Open in Web Editor NEWA blocking queue written in Elixir.
License: MIT License
A blocking queue written in Elixir.
License: MIT License
Would you be interested in labeling a new release for the code that's in master
? It has the size
operation which I'm using. It would be nice if it was labeled for a release.
Thank you!
Hi!
I've been reading through your Learning Elixir blog and I'm really enjoying it! I wanted to play around with your blocking queue, however, and find that the public API you provide via the BlockingQueue.push and BlockingQueue.pop methods don't seem to account for the default timeout of 5s imposed by GenServer.call.
Example:
iex(1)> {:ok, q} = BlockingQueue.start_link(5)
{:ok, #PID<0.231.0>}
iex(2)> BlockingQueue.pop q
** (exit) exited in: GenServer.call(#PID<0.231.0>, :pop, 5000)
** (EXIT) time out
(elixir) lib/gen_server.ex:564: GenServer.call/3
iex(2)> {:ok, q} = BlockingQueue.start_link(2)
{:ok, #PID<0.234.0>}
iex(3)> BlockingQueue.push q, 1
nil
iex(4)> BlockingQueue.push q, 2
nil
iex(5)> BlockingQueue.push q, 3
** (exit) exited in: GenServer.call(#PID<0.234.0>, {:push, 3}, 5000)
** (EXIT) time out
(elixir) lib/gen_server.ex:564: GenServer.call/3
I suspect I'm doing something I shouldn't, but thought I would ask if this is the expected behavior. :-)
Compilation fails with:
error: undefined variable "deps"
error: undefined variable "description"
error: undefined variable "package"
Fixes in #18
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.