summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
Diffstat (limited to 'load.c')
-rw-r--r--load.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/load.c b/load.c
index a320c51..b85d903 100644
--- a/load.c
+++ b/load.c
@@ -417,9 +417,10 @@ load_lock(const char *ftptr)
}
static int
-release_barrier(st_data_t key, st_data_t *value, st_data_t done)
+release_barrier(st_data_t key, st_data_t *value, st_data_t done, int existing)
{
VALUE barrier = (VALUE)*value;
+ if (!existing) return ST_STOP;
if (done ? rb_barrier_destroy(barrier) : rb_barrier_release(barrier)) {
/* still in-use */
return ST_CONTINUE;