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, 2009 at 6:28 PM, Wayne <> wrote:

> 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
> >

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to