Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
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() {
buffer = b;
}
- public Producteur(BufferCirc b, String name) {
+ public Producteur(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() {