Permalink
Browse files

Avoid assigning bindings that are still in-use

  • Loading branch information...
1 parent 9d9d5e9 commit a9077a01316e1260e97450b3be4f5f1c988580b0 @tmm1 tmm1 committed Jul 14, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 ext/binder.cpp
View
@@ -33,7 +33,8 @@ unsigned long Bindable_t::CreateBinding()
{
// XXX use atomic_t to prevent thread-safety issues
static unsigned long num = 0;
- return ++num;
+ while(BindingBag[++num]);
+ return num;
}
#if 0

0 comments on commit a9077a0

Please sign in to comment.