in reply to Win32::GUI, tell an event handler to stop

Change your architecture from:
guicode --(event)--> dbiquery
to:
guicode --(event)--> supervisor supervisor --> dbiquery
Your supervisory code (in your "model" of an MVC pattern) needs to act as a guardian against illegal uses of its resources, such as the dbiquery capability. If two requests come in, then handle it safely. (1) don't process the second one, (2) enqueue the second one to happen subsequently, or (3) safely terminate the first one, if appropriate and possible.

Don't assume dbiquery can do this for you. Don't weigh down your front-end code with this job, either, because today it's a Win32::GUI, tomorrow it's a CGI::Application, next year it's an AJAX::iPhone or whatever. If the backend has technical limitations, your data model's API should do all the supervisory checking.

--
[ e d @ h a l l e y . c c ]