Skip to content

Instantly share code, notes, and snippets.

@lpgauth
Created April 24, 2012 16:39
Show Gist options
  • Save lpgauth/2481303 to your computer and use it in GitHub Desktop.
Save lpgauth/2481303 to your computer and use it in GitHub Desktop.
diff --git a/src/dispcount_watcher.erl b/src/dispcount_watcher.erl
index 708cd20..c3bb67a 100644
--- a/src/dispcount_watcher.erl
+++ b/src/dispcount_watcher.erl
@@ -149,6 +149,8 @@ is_free(Tid, Id) ->
%% which should cause no overhead but be fine to deal
%% with short spikes.
case ets:update_counter(Tid, Id, {2,1}) of
+ 3 -> true;
+ 2 -> true;
1 -> true;
_ -> false
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment