tejasajmera commented on a change in pull request #6358:
URL: https://github.com/apache/incubator-pinot/pull/6358#discussion_r544641793



##########
File path: thirdeye/thirdeye-frontend/app/utils/pub-sub.js
##########
@@ -0,0 +1,72 @@
+/** A very lightweight pub-sub implementation to communicate between 
ember-model-table
+ *  and the hosting component
+ *
+ *  Usage:
+ *  import pubSub from 'app/utils/pub-sub';
+ *
+ *  For publishing
+ *  pubSub.publish('testEvent', data);
+ *
+ *  For subscribing
+ *  const subscription = pubSub.subscribe('testEvent', (data) => {
+ *  });
+ *
+ *  For unsubscribing
+ *  subscription.unSubscribe();
+ */
+class PubSub {

Review comment:
       @zhangloo333 Every import shares the same instance. I have further 
validated it with a dry run.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to