Skip to content

Commit

Permalink
Add TODOs #141
Browse files Browse the repository at this point in the history
  • Loading branch information
hdsdi3g committed Jun 20, 2023
1 parent a1eaf99 commit fcf85b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Not reusable
*/
@Slf4j
public class DataExchangeInOutStream {
public class DataExchangeInOutStream { // TODO add timeout wait

private final InternalInputStream internalInputStream;
private final InternalOutputStream internalOutputStream;
Expand Down Expand Up @@ -178,7 +178,7 @@ public void write(final byte[] b, final int off, final int len) throws IOExcepti
}

if (state == State.WORKING) {
while (readQueue.isEmpty() == false) {
while (readQueue.isEmpty() == false) {// FIXME dangerous
Thread.onSpinWait();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ void testBaseCopy() throws IOException, InterruptedException, ExecutionException
assertEquals(WRITER_MANUALLY_CLOSED, exchange.getState());
}

// TODO check behavior if reader is blocked
// TODO check behavior if writer is blocked
// TODO check behavior if readed is 0 size

@Test
void testBaseCopy_filtered() throws IOException, InterruptedException, ExecutionException, TimeoutException {
exchange = new DataExchangeInOutStream();
Expand Down

0 comments on commit fcf85b7

Please sign in to comment.