Description
I hit this one when I was working on a port of the Hadoop Streaming logic to Crunch: if a DoFn emits records via some sort of asynchronous process (e.g., a daemon thread), it can cause a problem for DoFnIterator, which doesn't have thread-safe controls over its underlying records list. Easy fix is to make the accessor methods for CacheEmitter inside of DoFnIterator synchronized.