234734a5f5
Since the work ReceiveCommits may take a long, potentially unbounded amount of time, we would like to have it run in the background so it can be monitored for timeouts and cancelled, and have stalls reported to the user from the main thread. Wraps ReceiveCommits in a new PreReceiveHook, AsyncReceiveCommits, that runs its delegated ReceiveCommits in a WorkQueue.Executor. The default implementation sizes the thread pool to the number of available processors, under the assumption that most database and pack operations are essentially CPU-bound. This is after reading the pack from the wire, indexing it, and storing it locally, so there is no I/O to the client involved, and available CPUs is a pretty good estimate. Since it may not be in some cases, for example if threads block on slow database I/O, the pool size is configurable. Change-Id: I5769944b49ead4224a1855ba72ee359de26e7bf8 |
||
---|---|---|
.. | ||
.settings | ||
src | ||
.gitignore | ||
pom.xml |