Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
nifoc committed Apr 6, 2015
1 parent 494b4b4 commit c32f44f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 0.3.1

[Documentation](http://noesis.nifoc.pw/0.3.1/)

* Correctly demonitor the worker process in `noesis_task:await/2`

## 0.3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT = noesis
PROJECT_VERSION = 0.3
PROJECT_VERSION = 0.3.1

otp_release = $(shell erl -noshell -eval 'io:format("~s", [erlang:system_info(otp_release)]), init:stop()')
otp_17plus = $(shell echo $(otp_release) | grep -q -E "^[[:digit:]]+$$" ; echo $$?)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A collection of useful utility functions.

## Resources

* [Generated EDoc](http://noesis.nifoc.pw/0.3/) ([All Versions](http://noesis.nifoc.pw))
* [Generated EDoc](http://noesis.nifoc.pw/0.3.1/) ([All Versions](http://noesis.nifoc.pw))

## License

Expand Down
2 changes: 1 addition & 1 deletion src/noesis.app.src
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{application, noesis, [
{description, "A collection of useful utility functions."},
{vsn, "0.3"},
{vsn, "0.3.1"},
{modules, []},
{registered, []},
{applications, [
Expand Down
12 changes: 8 additions & 4 deletions src/noesis_task.erl
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ await(Ref, Timeout) when is_reference(Ref) ->
await({Ref, MRef, Pid}, Timeout) ->
receive
{Ref, Result} ->
true = if
is_reference(MRef) -> demonitor(MRef, [flush]);
true -> true
end,
ok = maybe_demonitor(MRef),
Result;
{'DOWN', MRef, process, Pid, Reason} -> {error, Reason}
after Timeout ->
Expand All @@ -96,3 +93,10 @@ await_multi_acc([], _Timeout, Acc) ->
await_multi_acc([{Key, Task}|Rest], Timeout, Acc) ->
Result = await(Task, Timeout),
await_multi_acc(Rest, Timeout, [{Key, Result} | Acc]).

-spec maybe_demonitor(reference() | unknown) -> ok.
maybe_demonitor(unknown) ->
ok;
maybe_demonitor(MRef) ->
true = demonitor(MRef, [flush]),
ok.

0 comments on commit c32f44f

Please sign in to comment.