X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=TD1%2Fexo3%2FProducteur.java;h=36b67a316b4153b29d7a2c69b08d87823f7ef56f;hb=e018d1ec033513412d9b3628a7d6701a48725382;hp=47a402180d5f8c9a6fa4854bc4b3b03f76c97858;hpb=18eb400ba6dc197a9be104038fa60055bcd83813;p=TD_SR.git diff --git a/TD1/exo3/Producteur.java b/TD1/exo3/Producteur.java index 47a4021..36b67a3 100644 --- a/TD1/exo3/Producteur.java +++ b/TD1/exo3/Producteur.java @@ -23,12 +23,14 @@ public class Producteur implements Runnable { 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) {} + catch (InterruptedException e) { + System.err.println("InterruptedException: " + e); + } } }