This is a Queued message handler architecture. Various design patterns are discussed here.
http://digital.ni.com/demo.nsf/websearch/2B074F767D74CE0786256D0100791858?OpenDocument&node=157200_US
or
http://zone.ni.com/devzone/learningcenter.nsf/03f7c60f17aad210862567a90054a26c/338ee44cb1c3450986256c2b007cf8c5?OpenDocument
Queued message handler with notification example can be found here.
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3D9CD56A4E034080020E74861&p_node=DZ52061&p_submitted=N&p_rank=&p_answer=&p_source=External
or
http://www.ni.com/devzone/lvzone/apd.htm
Jim Kring's contribution is a wondeful example of how to write re-usable code. Check it out!
Ben