You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Pierre Coquentin <pi...@gmail.com> on 2016/07/27 09:48:07 UTC
Synchronized block in StreamTask
Hi,
I've a simple technical question about kafka streams and I don't know if I
should use users@kafka.apache.org or this mailing list.
In class org.apache.kafka.streams.processor.internals.StreamTask, the
method "process" use a synchronized block but I don't see why, the method
doesn't seem to be called in a multithreaded environnement as it's created
and owned by a specific thread
org.apache.kafka.streams.processor.internals.StreamThread.
Am I missing something ? Or, as the API is unstable, this class is meant in
the future to be used by several threads ?
Regards,
Pierre
Re: Synchronized block in StreamTask
Posted by Guozhang Wang <wa...@gmail.com>.
Hello Pierre,
Thanks for pointing this out. Good question actually, I think it is safe to
remove the synchronization block.
Mind filing a one-liner PR?
Guozhang
On Wed, Jul 27, 2016 at 2:48 AM, Pierre Coquentin <
pierre.coquentin@gmail.com> wrote:
> Hi,
>
> I've a simple technical question about kafka streams and I don't know if I
> should use users@kafka.apache.org or this mailing list.
> In class org.apache.kafka.streams.processor.internals.StreamTask, the
> method "process" use a synchronized block but I don't see why, the method
> doesn't seem to be called in a multithreaded environnement as it's created
> and owned by a specific thread
> org.apache.kafka.streams.processor.internals.StreamThread.
> Am I missing something ? Or, as the API is unstable, this class is meant in
> the future to be used by several threads ?
>
> Regards,
>
> Pierre
>
--
-- Guozhang