Skip to content
Snippets Groups Projects
Commit e36f4993 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

add comments regarding isInterrupted() loop completion test within thread

parent 4d2a9625
No related branches found
No related tags found
No related merge requests found
......@@ -407,6 +407,7 @@ public class DisThreadedNetworkInterface
ByteBuffer byteBuffer = ByteBuffer.allocate(MAX_TRANSMISSION_UNIT_SIZE);
DatagramPacket receivedPacket = new DatagramPacket(byteBuffer.array(), byteBuffer.capacity());
// https://stackoverflow.com/questions/26647840/how-do-i-interrupt-kill-a-hung-thread-in-java
while (!killed && !Thread.currentThread().isInterrupted()) // loop until terminated
{
try
......@@ -456,6 +457,7 @@ public class DisThreadedNetworkInterface
dos = new DataOutputStream(baos);
packet = new DatagramPacket(baos.toByteArray(), baos.size(), inetSocket);
// https://stackoverflow.com/questions/26647840/how-do-i-interrupt-kill-a-hung-thread-in-java
while (!killed && !Thread.currentThread().isInterrupted()) // loop until terminated
{
try
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment