flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aljoscha Krettek <aljos...@apache.org>
Subject Re: Question: SourceFunction
Date Tue, 16 Jun 2015 14:08:41 GMT
But the sources stay inside they run() method the whole execution time, per
design. That's why another thread needs to call cancel() on the source to
break it out of this (in most cases) infinite loop.

On Tue, 16 Jun 2015 at 14:13 Matthias J. Sax <mjsax@informatik.hu-berlin.de>

> Hi,
> I just encountered, that the (new streaming API) SourceFunction
> interface method cancel() states in the JavaDoc, that one might have a
> "volatile field 'isRunning'". Why should this member be volatile? I do
> not see why different thread should access this field (I would claim, it
> will be implemented as a private/protected member variable), and thus,
> declaring it volatile should not be necessary.
> Do I miss anything?
> -Matthias

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message