Closed GoogleCodeExporter closed 9 years ago
Thanks a lot! The patch looks good, however I want to test it first. I'm sorry
about the delay...
Original comment by thomas.t...@gmail.com
on 9 Mar 2011 at 7:49
Please run ./build.sh spellcheck
Please don't make Utils.COUNTER public, instead add a method
public static long getNewObjectCounter() {
return COUNTER.get();
}
Please run ./build.sh docs (there is a method with wrong identation)
Please add ConcurrencyTest to TestAll
After this, please submit a new patch, I will then have a look again.
Original comment by thomas.t...@gmail.com
on 26 Mar 2011 at 10:46
I've revisited this patch since it was asked about on the group.
While my patch does solve the concurrent re-use of the table alias object as
outlined in my first post it breaks Where functionality. Specifically the few
changes to TableDefinition are problematic because they solve one problem at
the expense of creating other problems.
I still advocate the other simple changes in the patch which improve concurrent
reuse of a Db instance:
1. Query.java: static *synchronized* <T> Query<T> from(Db db, T alias) {
2. Db.java: private final Map<Class<?>, TableDefinition<?>> classMap =
- Utils.newHashMap();
+ Collections.synchronizedMap(new HashMap<Class<?>,
TableDefinition<?>>());
I don't think its worthwhile to submit a revised patch file for those two
changes.
Original comment by James.Mo...@gmail.com
on 9 Jul 2011 at 3:27
Original comment by thomas.t...@gmail.com
on 22 Sep 2011 at 4:35
Original issue reported on code.google.com by
James.Mo...@gmail.com
on 8 Mar 2011 at 2:30Attachments: