X-Git-Url: https://git.piment-noir.org/?p=TD_SR.git;a=blobdiff_plain;f=TD1%2Fexo3%2FConsommateur.java;h=128249940e41c1ef71f8521eed41b23bba1bcdcd;hp=a857e7eee42e94c58adc7134c8dc5d0a0796b5b0;hb=2ef76f09b55d5e1d5ad9535603688b42e91c0783;hpb=bdbcb0e4ae5bd4102793377fc26055db87ce3557 diff --git a/TD1/exo3/Consommateur.java b/TD1/exo3/Consommateur.java index a857e7e..1282499 100644 --- a/TD1/exo3/Consommateur.java +++ b/TD1/exo3/Consommateur.java @@ -9,13 +9,13 @@ public class Consommateur implements Runnable { buffer = b; } - public Consommateur(BufferCirc b, String name) { + public Consommateur(BufferCirc b, Thread th, String name) { buffer = b; - setThName(name); + setThName(th, name); } - public void setThName(String name) { - Thread.currentThread().setName(name); + public void setThName(Thread th, String name) { + th.setName(name); } public void run() {