moved thread control code into new j5.OS.ThreadControl module

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@3866 25043fe6-1616-0410-a82d-ba8f324cfe61
factor out individual stop_thread method

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@3927 25043fe6-1616-0410-a82d-ba8f324cfe61
split thread stopping into two methods, graceful_ and forceful_ and made stop_thread call them adjusted stop_threads to try all stops gracefully first before trying forceful (this gives the graceful a greater chance) increased default wait times

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@3953 25043fe6-1616-0410-a82d-ba8f324cfe61
Change all except: and excepts which catch Exception to only catch StandardError, hopefully allowing one to actually escape starting up with ctrl-c without confusing things

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@5111 25043fe6-1616-0410-a82d-ba8f324cfe61
Add ability to handle custom threads that don't use a target Don't repeat thread name in shutdown warning (it comes in the callstr anyway)

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@5309 25043fe6-1616-0410-a82d-ba8f324cfe61
Fixed extra argument

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@5310 25043fe6-1616-0410-a82d-ba8f324cfe61
Use undocumented internals of the threading module rather than enumerating which can cause lockups Handle KeyboardInterrupts in the graceful sleeping stage, and treat them as a call to recklessness (otherwise this code simply aborts leaving the hung threads running)

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@5546 25043fe6-1616-0410-a82d-ba8f324cfe61
Added filter_threads method, and ability to limit which threads get stopped by stop_threads

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@6719 25043fe6-1616-0410-a82d-ba8f324cfe61
Errors trying to kill a thread shouldn't terminate the thread killing process

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@6908 25043fe6-1616-0410-a82d-ba8f324cfe61
Replace all `StandardError` catches in `DataExchange` with `Exception` catches This is a general cleanup that we did before to the rest of the code Basically errors generated from C libraries or external libraries are usually not `StandardError`s, and we should almost never look for `StandardError`s Also improved import error logging, and removed whitespace

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@7036 25043fe6-1616-0410-a82d-ba8f324cfe61
When there's an error, log the traceback too

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@7285 25043fe6-1616-0410-a82d-ba8f324cfe61
Removed all constant lists from function declarations I could find

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@8490 25043fe6-1616-0410-a82d-ba8f324cfe61
Improved logic for stopping threads: * Use a common function for detecting remaining threads to stop * Only try and stop threads that are still alive * Before concluding that unstoppable threads remain after forcible stop, wait a while (in slices) See #3720

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@11535 25043fe6-1616-0410-a82d-ba8f324cfe61
Started creating module with thread debugging helper functions - with tests. See #4380

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@13261 25043fe6-1616-0410-a82d-ba8f324cfe61
Added wsgi_requests searching method. See #4380

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@13262 25043fe6-1616-0410-a82d-ba8f324cfe61
Added a method for finding wsgi environs (you can't search for these easily, so it needs the whole list of current live objects). See #4380

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@13263 25043fe6-1616-0410-a82d-ba8f324cfe61
Added a method for finding thread leaf frames. See #4380

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@13264 25043fe6-1616-0410-a82d-ba8f324cfe61
Started adding a debug screen. See #4380

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@13268 25043fe6-1616-0410-a82d-ba8f324cfe61
Adjusted logging and use a logger for `j5.OS`. See #4380

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@13269 25043fe6-1616-0410-a82d-ba8f324cfe61
Use global loggers. See #4380

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@13270 25043fe6-1616-0410-a82d-ba8f324cfe61