Registering participants in Phaser

When you create a Phaser object, you indicate how many participants will have that phaser. But the Phaser class has two methods to increment the number of participants of phaser. These methods are as follows:

  • register(): This method adds a new participant to Phaser. This new participant will be considered unarrived to the actual phase.
  • bulkRegister(int Parties): This method adds the specified number of participants to phaser. These new participants will be considered unarrived to the actual phase.

The only method provided by the Phaser class to decrement the number of participants is the arriveAndDeregister() method that notifies phaser that the thread has finished the actual phase and it doesn't want to continue with the phased operation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.193.134