diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-07-20 14:01:56 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-07-20 14:01:56 -0700 |
commit | 99d9141f5d57e286c8205b13c41dde34b4bca16d (patch) | |
tree | f5137bee4b53a1ad312fdbc38733f933e729c14f /ext/clogger_ext/clogger.c | |
parent | d6328a6f31f97bded75a4e2aba73f85366215924 (diff) | |
download | clogger-99d9141f5d57e286c8205b13c41dde34b4bca16d.tar.gz |
Nothing wrong with the GVL in Ruby 1.9.3; but we'll need to modify our code if it's removed for C extensions.
Diffstat (limited to 'ext/clogger_ext/clogger.c')
-rw-r--r-- | ext/clogger_ext/clogger.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/clogger_ext/clogger.c b/ext/clogger_ext/clogger.c index e8cbfdc..e1fcecb 100644 --- a/ext/clogger_ext/clogger.c +++ b/ext/clogger_ext/clogger.c @@ -890,10 +890,12 @@ static VALUE clogger_call(VALUE self, VALUE env) env = rb_check_convert_type(env, T_HASH, "Hash", "to_hash"); if (c->wrap_body) { + /* XXX: we assume the existence of the GVL here: */ if (c->reentrant < 0) { VALUE tmp = rb_hash_aref(env, g_rack_multithread); c->reentrant = Qfalse == tmp ? 0 : 1; } + if (c->reentrant) { self = rb_obj_dup(self); c = clogger_get(self); |