[erlang-questions] gproc patch

16 views
Skip to first unread message

Garret Smith

unread,
Jan 18, 2011, 7:21:39 PM1/18/11
to erlang-q...@erlang.org
Fixed a small issue with gproc in the 'await' function when no timeout
is specified.

see branch 'fix-await-notimeout' in the repository
git://github.com/garret-smith/gproc.git

or the patch:

--- a/src/gproc.erl
+++ b/src/gproc.erl
@@ -312,7 +312,7 @@ request_wait({n,C,_} = Key, Timeout) when C==l; C==g ->
WRef = call({await,Key,self()}, C),
receive
{gproc, WRef, registered, {_K, Pid, V}} ->
- case Timeout of
+ case TRef of
no_timer -> ignore;
_ -> erlang:cancel_timer(TRef)
end,


I don't know of any guidelines for patch submission since this is not
OTP, so let me know if there is a better way I can provide patches now
or in the future.

-G

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-questio...@erlang.org

Ulf Wiger

unread,
Jan 20, 2011, 12:02:01 PM1/20/11
to Garret Smith, erlang-q...@erlang.org

Hi Garrett,

Which version of gproc are you using?

That particular bug was fixed on Jan 11 in http://github.com/esl/gproc
(That is, quite recently. :)

Sending pull requests to that project will work just fine.

BR,
Ulf W

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com

Garret Smith

unread,
Jan 20, 2011, 12:42:55 PM1/20/11
to Ulf Wiger, erlang-q...@erlang.org
I was using the version at https://github.com/uwiger/gproc.git which
looks identical except for that patch :)

-G

Ulf Wiger

unread,
Jan 21, 2011, 2:19:05 AM1/21/11
to Garret Smith, erlang-q...@erlang.org

How funny! I checked by simply substituting 'uwiger' for 'esl'
in the commit URL:

https://github.com/uwiger/gproc/commit/2742634c2ec608c341d425827eef7f6421849ea5

…and there it was.

Is this some weird artefact of how github interprets its URIs?

Anyway, I consider github.com/esl/gproc to be the official one,
even though I will strive to keep the uwiger version in synch.

BR,
Ulf

Alain O'Dea

unread,
Jan 21, 2011, 12:01:36 PM1/21/11
to Ulf Wiger, Garret Smith, erlang-q...@erlang.org
It's more likely that the commit is present in both repositories, but one does not have it on the master branch.

Garret Smith

unread,
Jan 21, 2011, 12:40:27 PM1/21/11
to Alain O'Dea, Ulf Wiger, erlang-q...@erlang.org
Thanks, I'll start tracking the esl version.

-G

Reply all
Reply to author
Forward
0 new messages