We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 234d5cb commit d9d65dcCopy full SHA for d9d65dc
spec/truffle/thread_safe_objects_spec.rb
@@ -255,4 +255,26 @@ def wb; @wb; end
255
shared?(new_hash).should == true
256
end
257
258
+ it "Fiber local variables which do not share the value" do
259
+ thread = Thread.current
260
+ shared?(thread).should == true
261
+
262
+ obj = Object.new
263
+ thread[:sharing_spec] = obj
264
+ begin
265
+ shared?(obj).should == false
266
+ ensure
267
+ thread[:sharing_spec] = nil
268
+ end
269
270
271
+ it "Thread local variables which share the value (probably they should not)" do
272
273
274
275
276
+ thread.thread_variable_set(:sharing_spec, obj)
277
+ shared?(obj).should == true # current non-ideal behavior
278
279
280
0 commit comments