File tree 1 file changed +3
-6
lines changed
transferqueue/QueueViaTransferQueue/src/main/java/ds/queueviatransferqueue
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -32,17 +32,15 @@ public static void main(String[] args) {
32
32
33
33
queue .transfer (element );
34
34
} catch (InterruptedException ex ) {
35
- Thread .currentThread ().interrupt ();
36
- // log or throw
35
+ Thread .currentThread ().interrupt ();
37
36
}
38
37
});
39
38
}
40
39
41
40
try {
42
41
Thread .sleep (5000 );
43
42
} catch (InterruptedException ex ) {
44
- Thread .currentThread ().interrupt ();
45
- // log or throw
43
+ Thread .currentThread ().interrupt ();
46
44
};
47
45
48
46
// prepare 3 consumers as threads
@@ -54,8 +52,7 @@ public static void main(String[] args) {
54
52
logger .log (Level .INFO , "Thread: {0}, Consume element: {1}" ,
55
53
new Object []{Thread .currentThread ().getName (), queue .take ()});
56
54
} catch (InterruptedException ex ) {
57
- Thread .currentThread ().interrupt ();
58
- // log or throw
55
+ Thread .currentThread ().interrupt ();
59
56
}
60
57
});
61
58
}
You can’t perform that action at this time.
0 commit comments