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

2.0 #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

2.0 #75

wants to merge 1 commit into from

Conversation

devinus
Copy link
Owner

@devinus devinus commented Apr 24, 2015

  • Use an ETS table for the waiting queue
  • Remove pre-17.0 support
  • Remove deprecated start/1
  • Remove handle_* fall-throughs
  • Remove status functions, replace with sys:get_status()
  • Remove non-blocking operations?
  • Use a queue for the workers
  • Add callback module support
  • Support runtime pool size changes

@jinnipark
Copy link

Why are you going to remove support for pre-17.0?
It'd be kicking me out :(

@devinus
Copy link
Owner Author

devinus commented Apr 24, 2015

@jinnipark It will only happen once 18.0 is released, at which point R16 will be two versions out of date.

gen_server:reply(From, Pid),
State#state{waiting = Left};
{empty, Empty} when Overflow > 0 ->
case ets:first(Waiting) of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Waiting ets table is of type set so dequeues are random or rather hash based. This is interesting but likely leads to the large 99% latencies of LIFO queues because a process hashed to an unlucky bucket will effectively be at the end of the queue, with newer process jumping ahead of it.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was operating based on my assumption that the first key according to the table's internal order will be returned (Erlang docs) meant there would order based on time of insertion, not hashed based on the waiting pid. That's unfortunate if that's how it works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will be disappointed I'm afraid :(.

@sanrodari
Copy link

Hi @devinus, I was wondering if this is still in working? Thanks

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

Successfully merging this pull request may close these issues.

4 participants