D
Daniel Berger
Hi all,
This is one of those, "Why are things this way" kind of questions.
Why doesn't PStore#transaction yield itself? That way I could write:
store.transaction{ |s|
s['names'] = %w/foo bar baz/
s['tree'] = T.new
}
Or maybe we could even use method_missing to clean things up even more:
store.transaction{ |s|
s.names = %w/foo bar baz/ # same as s['names']
s.tree = T.new
}
Some thread safety issue I'm not aware of in the first case? Too slow in the
second?
Just curious.
Dan
This is one of those, "Why are things this way" kind of questions.
Why doesn't PStore#transaction yield itself? That way I could write:
store.transaction{ |s|
s['names'] = %w/foo bar baz/
s['tree'] = T.new
}
Or maybe we could even use method_missing to clean things up even more:
store.transaction{ |s|
s.names = %w/foo bar baz/ # same as s['names']
s.tree = T.new
}
Some thread safety issue I'm not aware of in the first case? Too slow in the
second?
Just curious.
Dan