repositories
/
TD_SR.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TD1: Refactor the client side code.
[TD_SR.git]
/
TD1
/
exo3
/
Producteur.java
diff --git
a/TD1/exo3/Producteur.java
b/TD1/exo3/Producteur.java
index f3cc123ac18ba582eba727a017023a0e29b176ee..36b67a316b4153b29d7a2c69b08d87823f7ef56f 100644
(file)
--- a/
TD1/exo3/Producteur.java
+++ b/
TD1/exo3/Producteur.java
@@
-23,13
+23,13
@@
public class Producteur implements Runnable {
public void run() {
while (true) {
buffer.depose(new Integer(val));
public void run() {
while (true) {
buffer.depose(new Integer(val));
- System.out.println
(Thread.currentThread().getName() +
" a depose " + val);
+ System.out.println
(Thread.currentThread().getName() +
" a depose " + val);
val++;
try {
Thread.sleep(ThreadLocalRandom.current().nextInt(101));
}
catch (InterruptedException e) {
val++;
try {
Thread.sleep(ThreadLocalRandom.current().nextInt(101));
}
catch (InterruptedException e) {
- System.
out
.println("InterruptedException: " + e);
+ System.
err
.println("InterruptedException: " + e);
}
}
}
}
}
}