Module hw06

Class ParallelDispatcher<TMsg>

java.lang.Object
provided.utils.dispatcher.impl.ADispatcher<TMsg>
provided.utils.dispatcher.impl.ParallelDispatcher<TMsg>
Type Parameters:
TMsg - The type of message being sent to the observers.
All Implemented Interfaces:
IDispatcher<TMsg>

public class ParallelDispatcher<TMsg> extends ADispatcher<TMsg>
A dispatcher that updates its observers in parallel if possible on multiple threads.
Author:
swong
  • Constructor Details

    • ParallelDispatcher

      public ParallelDispatcher()
  • Method Details

    • updateAll

      public void updateAll(TMsg msg)
      Description copied from interface: IDispatcher
      Send the given message to all the observers in the dispatcher
      Parameters:
      msg - The IMsg to send to all the observers