SemaphoreDemo: Added comments
This commit is contained in:
@@ -28,7 +28,10 @@ class MyThread extends Thread
|
||||
String threadName;
|
||||
|
||||
public MyThread(Semaphore mySemPro, Semaphore mySemCon, String threadName)
|
||||
{
|
||||
{
|
||||
// The Thread class constructor that takes a String argument creates
|
||||
// a Thread with a specific name
|
||||
// (as opposed to automatically generated names such as Thread-1).
|
||||
super(threadName);
|
||||
// We set the semaphores from the main method
|
||||
this.semPro = mySemPro;
|
||||
|
||||
Reference in New Issue
Block a user