-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLamportTest.java
More file actions
28 lines (22 loc) · 812 Bytes
/
Copy pathLamportTest.java
File metadata and controls
28 lines (22 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package logicalclock;
/**
*
* @author Ian Gortan
*/
public class LamportTest {
public static void main(String[] args) {
System.out.println("starting ....");
MessageBuffer buffer = new MessageBuffer(10);
(new Thread(new LamportClient(buffer, 0))).start();
(new Thread(new LamportClient(buffer, 1))).start();
(new Thread(new LamportClient(buffer, 2))).start();
// (new Thread(new TestReceiver(buffer, 1))).start();
//(new Thread(new TestReceiver(buffer, 2))).start();
//(new Thread(new testSender(buffer, 0))).start();
}
}