Add multi-thread support
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
#undef NDEBUG
|
||||
#include "alloc.h"
|
||||
|
||||
#include <assert.h>
|
||||
@ -130,7 +131,6 @@ int main(int argc, const char **argv) {
|
||||
RefcountWeakref *x = refcount_context_weaken(c, a);
|
||||
w = refcount_context_make_weakref(c, a);
|
||||
assert(refcount_context_num_refs(c, a) == 1);
|
||||
assert(w != x);
|
||||
refcount_context_destroy_weakref(c, x);
|
||||
|
||||
refcount_context_ref(c, a);
|
||||
@ -138,7 +138,6 @@ int main(int argc, const char **argv) {
|
||||
|
||||
x = refcount_context_weaken(c, a);
|
||||
assert(refcount_context_num_refs(c, a) == 1);
|
||||
assert(w != x);
|
||||
assert(refcount_context_weakref_is_valid(c, w));
|
||||
assert(refcount_context_weakref_is_valid(c, x));
|
||||
|
||||
|
Reference in New Issue
Block a user