Re: Java thread safety

2009-06-16 Thread Kenton Varda
The Java implementation does not contain any mutable singletons, so as long as you are accessing different objects, there is no need to worry about thread-safety. So, yes, multiple threads may call parseFrom() at the same time as long as they are parsing from different streams. On Mon, Jun 15,

Java thread safety

2009-06-15 Thread Wayne
In the Java Generated code, there are functions like ParseFrom (CodedInputStream ...) that create protocol buffers messages from a file or other buffer. Can I call these directly from multiple different threads or should I use a wrapper with the synchronized keyword? Thanks, Wayne