For cases where use of a different thread is needed, it can write tuples to
a queue from where the operator thread pulls them -- JdbcPollInputOperator
in Malhar has an example.

Ram

On Wed, Aug 10, 2016 at 1:50 PM, [email protected] <[email protected]> wrote:

> Hey Vlad,
>
> Thanks for bringing this up. Is there an easy way to detect unexpected use
> of emit method without hurt the performance. Or at least if we can detect
> this in debug mode.
>
> Regards,
> Siyuan
>
> On Wed, Aug 10, 2016 at 11:27 AM, Vlad Rozov <[email protected]>
> wrote:
>
>> The short answer is no, creating worker thread to emit tuples is not
>> supported by Apex and will lead to an undefined behavior. Operators in Apex
>> have strong thread affinity and all interaction with the platform must
>> happen on the operator thread.
>>
>> Vlad
>>
>
>

Reply via email to