The 'delete', 'download', and 'upload' commands use multiple threads
for concurrency. However, the number of threads was hardcoded at
10. This patch simply makes those configurable.
For example, if I'm downloading a lot of files but I don't want to
saturate the downstream on my Internet connection, I might choose to
use only 1 or 2 threads for object downloads. Conversely, if I'm
uploading a lot of small files across a fast network, I would want
lots of threads to speed things along.
The default number of threads is 10, so the default behavior is
unchanged.
Change-Id: I64c06741b24ca97fef5ded206d7e898bf5cab3b8
The first time the user presses ctrl-c, all QueueFunctionThreads will
have abort=True set on them. This will cause them to finish the work
they're doing (e.g. finish uploading the current file) but then ignore
any further work and let the process exit. Also, a notification of
this is written to stderr so the user understands why the process
didn't exit immediately.
The second time the user presses ctrl-c, the process will exit
immediately. Any in-progress operations are abandoned.
Change-Id: Ie6927f78726ac1c7998e920cb608682ead10f25b
Before, if a QueueFunctionThread's function raised an exception, then
its thread would log the exception and exit, leaving the rest of the
jobs in the queue and ensuring that the swift client would hang.
Now, the exception is logged and processing continues, so all the
messages get handled eventually and the client exits.
Change-Id: I43d4df212847a2a85732b304de319ea2cce82ddd