You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Yang <te...@gmail.com> on 2011/09/06 18:05:17 UTC

transceiver can be shared between clients/threads?

from the constructor of SpecificRequestor, it does not seem to have
restrictions,
but after I share the same transceiver between clients, it gave errors.
I looked into the code, it seems it does have some per-instance state info,
so I guess
a transceiver can not be shared between clients,

could you please confirm?

Thanks
Yang

Re: transceiver can be shared between clients/threads?

Posted by Yang <te...@gmail.com>.
Thanks Doug and Scott.

I found that it *could* be because that I closed the transceiver, which of
course would lead to errors if some other threads are still using it.
let me do more tests to make sure

Yang

On Tue, Sep 6, 2011 at 3:21 PM, Doug Cutting <cu...@apache.org> wrote:

> Transceiver and Requestor should actually be thread-safe.
>
> What version of Avro are you using?  Can you provide a test case that
> shows how this fails?  If so, please file a bug report.
>
> Thanks,
>
> Doug
>
> On 09/06/2011 03:06 PM, Scott Carey wrote:
> > I do not believe the current implementation is thread-safe.
> >
> > On 9/6/11 9:05 AM, "Yang" <teddyyyy123@gmail.com
> > <ma...@gmail.com>> wrote:
> >
> >     from the constructor of SpecificRequestor, it does not seem to have
> >     restrictions,
> >     but after I share the same transceiver between clients, it gave
> errors.
> >     I looked into the code, it seems it does have some per-instance
> >     state info, so I guess
> >     a transceiver can not be shared between clients,
> >
> >     could you please confirm?
> >
> >     Thanks
> >     Yang
>

Re: transceiver can be shared between clients/threads?

Posted by Doug Cutting <cu...@apache.org>.
Transceiver and Requestor should actually be thread-safe.

What version of Avro are you using?  Can you provide a test case that
shows how this fails?  If so, please file a bug report.

Thanks,

Doug

On 09/06/2011 03:06 PM, Scott Carey wrote:
> I do not believe the current implementation is thread-safe.
> 
> On 9/6/11 9:05 AM, "Yang" <teddyyyy123@gmail.com
> <ma...@gmail.com>> wrote:
> 
>     from the constructor of SpecificRequestor, it does not seem to have
>     restrictions, 
>     but after I share the same transceiver between clients, it gave errors.
>     I looked into the code, it seems it does have some per-instance
>     state info, so I guess 
>     a transceiver can not be shared between clients, 
> 
>     could you please confirm?
> 
>     Thanks
>     Yang

Re: transceiver can be shared between clients/threads?

Posted by Scott Carey <sc...@apache.org>.
I do not believe the current implementation is thread-safe.

On 9/6/11 9:05 AM, "Yang" <te...@gmail.com> wrote:

> from the constructor of SpecificRequestor, it does not seem to have
> restrictions, 
> but after I share the same transceiver between clients, it gave errors.
> I looked into the code, it seems it does have some per-instance state info, so
> I guess 
> a transceiver can not be shared between clients,
> 
> could you please confirm?
> 
> Thanks
> Yang