fogfish / esq

simple persistent queues for Erlang
Apache License 2.0
56 stars 10 forks source link

Length of the queue #4

Open fogfish opened 7 years ago

fogfish commented 7 years ago

A function -spec esq:length(_) -> integer() is a nice feature. There are no rocket science to make it for in-memory queue. However, the file queue requires persistency of counter that would cause extra unnecessary disk I/O.

Alternative option `-spec esq:empty(_) -> true | false.'

fogfish commented 7 years ago

@silviucpp any thought ?

silviucpp commented 7 years ago

Your alternative is good enough :)