godotgildor/Suns — pull request #1 by Gabriel439 (2013-01-08 19:33:58+00:00)
Title: Fixes to searching and cancelling

This fixes a lot of issues that arose from sending multiple stop_consuming requests to the same channel. This doesn't eliminate all possible concurrency race conditions, but it does get rid of most of them so that 99% of our users shouldn't have the wizard lock up or freeze by using the search or cancel buttons improperly. You can pretty much spam the two buttons in any arbitrary order and it will almost never lock up now and do the right thing (although, do so with an easy request otherwise you will jam up the server's only search instance).

Note that the pika backend will still raise tons of exceptions like it did before, but these will no longer cause the wizard to malfunction or require a wizard restart. This is mainly a problem with pika.

This also does a lot of other small cosmetic fixes both to the user API and to the source code. The most notable change to the user facing API is the rearrangement of buttons (mainly so that both search and fetch context can have their own cancellation buttons) and making the selection query visible instead of hidden (and it is named `query`), so that users can build it with their own selection logic using pymol commands if they so choose and show/hide it.