From c0de0870ed3f3262b55e6d2057c934ef867cded8 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 24 Jan 2017 13:31:52 +0000 Subject: [PATCH] Some sarcastic comments --- src/dispatcher.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dispatcher.js b/src/dispatcher.js index ed0350fe54..11c79f58ee 100644 --- a/src/dispatcher.js +++ b/src/dispatcher.js @@ -42,6 +42,9 @@ class MatrixDispatcher extends flux.Dispatcher { } } +// XXX this is a big anti-pattern, and makes testing hard. Because dispatches +// happen asynchronously, it is possible for actions dispatched in one thread +// to arrive in another, with *hilarious* consequences. if (global.mxDispatcher === undefined) { global.mxDispatcher = new MatrixDispatcher(); }