Github user bOOm-X commented on the issue:
https://github.com/apache/spark/pull/18253
> Well, you could use an ArrayBlockingQueue. Then no extra object is
allocated either.
Yes I agree. But you get the synchronization too. I am still agree that it
should not have a big impact yet. But using an ArrayBlockingQueue does not
simplify the code a lot. The current implementation is not complicated, not too
verbose, and base on a simple pure scala array. I do not think that it has a
huge complexity cost compared to the java ArrayBlockingQueue.
I change the Thread.sleep to a Thread.yield to be less agressive for the
thread unscheduling. Even with very few messages it should not consume too much
CPU, and it will be much more reactive when messages are bursting.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]