Skip to content

Commit

Permalink
[Java] Don't encourage the allocation of buffers in a loop, even with…
Browse files Browse the repository at this point in the history
…in tests.
  • Loading branch information
mjpt777 committed Dec 18, 2019
1 parent c3150b7 commit 5ebfca0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ public void testMultiService()

try
{
while (client.offer(new ExpandableArrayBuffer(100), 0, 100) < 0)
final DirectBuffer buffer = new ExpandableArrayBuffer(100);

while (client.offer(buffer, 0, 100) < 0)
{
Thread.yield();
TestUtil.checkInterruptedStatus();
Expand Down

0 comments on commit 5ebfca0

Please sign in to comment.