Skip to content

Commit ca1ae66

Browse files
committed
Fix ordeting on Java 7 in volatile variable write
1 parent 7041187 commit ca1ae66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/com/concurrent_ruby/ext/SynchronizationLibrary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ public IRubyObject InstanceVariableSetVolatile(ThreadContext context, IRubyObjec
144144
UnsafeHolder.storeFence();
145145
return result;
146146
} else {
147+
final IRubyObject result = instance_variable_set(name, value);
147148
UnsafeHolder.U.putIntVolatile(this, AN_VOLATILE_FIELD_OFFSET, 1);
148-
IRubyObject result = instance_variable_set(name, value);
149149
return result;
150150
}
151151
}

0 commit comments

Comments
 (0)