RequestManager Stop() vs StopAutomaticDispatch()

Jun 9, 2009 at 9:42 PM

The difference between Stop and StopAutomaticDispatch is subtle... perhaps too much so.  Stop is functionaly just a pause since the next enqueue event or connection status change event may trigger the thread to resume.  On the other hand StopAutomaticDispatch disassociates the event handlers that wake the thread again and truly stops the agent.  That seems odd to me for some reason.  Start is there to be the opposite of Start, and thus you end up with StartAutomaticDispatch as the one that gets the agent running.  How about replacing Stop and Start with Sleep and Wake... that would open up Start and Stop to do what they automatically imply giving you a cleaner RequestManager Start / Stop / Sleep / Wake API.  Just an opinion...