On Wed, 2010-12-01 at 12:55 +0100, Roman Kennke wrote: > Hi, > > >> I've got a service that users can use to download files from a http. I want > >> to add functionality so that a user can supply many urls and the service > >> starts to download the files. So I wondered if the way described here[1] is > >> the corrects approach, section about Multithreaded request execution > >> > >> Cheers, håkon > >> > > > >Yes, it is. > > Am I correct that BasicHttpContext must not be shared between threads? Would > it be ok to share SyncBasicHttpContext? Or does it never make sense to share > the context? >
Generally each execution thread should have a local HttpContext instance. Sharing the same execution context between multiple threads does not really make sense and may cause issues with some protocol interceptors. Though, one may share some objections between multiple contexts such as cookie store or auth credentials provider. Hope this helps Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
