Commits

Brad Baker committed 5c9ccb0

more explanation

Comments (0)

Files changed (1)

-A tutorial on Asynchronous Events in Atlassian Plugins.  It demonstrates how you can use both Synchronous and Asynchronous events in a plugin
+A tutorial on Asynchronous Events in Atlassian Plugins.
+
+
+It demonstrates how you can use both Synchronous and Asynchronous events in a plugin.
+
+For example imagine you want to perform a really long operation (> 100ms) when an issue goes into a certain state.
+
+If you do this during the standard synchrnous issue event then you will block the HTTP thread until you code finishes.
+
+This code demonstrates how you can re-raise an asynchronous event and hence allow the main HTTP thread to complete as fast as possible.
+
+You long processing can then take place off in another thread of execution.
+
+BEWARE : Multi-threaded applications are kinda tricky.  A bunch of ThreadLocal based services such as user AuthenticationContext services are not
+available or correct on non HTTP threads of execution.  You must be aware of the services you use on this non HTTP thread of execution so you
+don't get any suprises or make assumptions about what is available on that thread.
+
+
 
 Here are the SDK commands you'll use immediately: