[erlang-questions] Erlang/OTP 20.0-rc2 is available for testing

Ulf Wiger ulf@REDACTED
Tue Jun 6 17:46:38 CEST 2017

I like the ets:select_replace/2 function.

Of course, in the first case where I thought it might be useful, I ended up
wishing for an extended version. ;-)


The 'claim' operation performs a chunked select of workers in a given pool,
and for each chunk of workers, tries to claim one by incrementing a counter
value - if the value went from 0 to 1, the claim succeeded.

A select_replace() function could handle the atomic claim operation, but
what I would want to do is to limit it to only one replace and to return
the resulting object - not just the count. This could potentially be
supported by a select_replace/3 function.

As far as I can recall, gproc_pool is competitive in terms of performance.
Such an extended select_replace() function _should_ give a significant
speedup, especially in the case of large busy pools (which possibly haven't
been benchmarked.)

Ulf W

2017-05-31 19:16 GMT+01:00 Kenneth Lundin <kenneth@REDACTED>:

> OTP 20 Release Candidate 2
> This is the second of two release candidates before the OTP 20 release.
> [...]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170606/d9df93c3/attachment.htm>

More information about the erlang-questions mailing list