[sword-devel] InstallMgr question

Nic Carter niccarter at mac.com
Thu May 30 19:18:56 MST 2013


Thanks for that info, Troy. I thought it looked like it assumed a single thread. However, I thought it probably was designed with multi-thread in mind. No problem, I shall queue downloads, as that probably makes more sense on a hand-held device. ;)

While we're on renaming things, osisruby.cpp now has been altered to call the option "Glosses". Should we take this opportunity to rename the class to OSISGlosses while things are being changed around?


Thanks, ybic
	nic...  :)

On 30/05/2013, at 1:46 PM, "Troy A. Griffitts" <scribe at crosswire.org> wrote:

> Hey Nic,
> 
> Thanks for the reminder about the name change.  I just checked in a fix for this.  While doing this rename, I saw things in the code which look like they depend on installModule being single threaded, like setting a single RemoteTransport parameter in InstallMgr to the most recent so that a 'Cancel' call can sent the cancel to the correct transport object.
> So, this means:
> 
> I.
> a) create some interface for canceling a transaction which is logical for multiple concurrent transactions.  This could be as simple as create a new RemoteTransport on each install call and returning that transport from the installModule method, and
> b) be sure the actual transport implementation you are using is threadsafe, i.e, can the Easy CURL options in libcurl be called concurrently?
> 
> or
> 
> II.
> a) just have 1 InstallMgr object per thread, and
> b) be sure the actual transport implementation you are using is threadsafe, i.e, can the Easy CURL options in libcurl be called concurrently?
> 
> 
> 
> 
> 
> 
> On 05/27/2013 04:48 AM, Nic Carter wrote:
>> Hey guys,
>> 
>> I'm just wondering if InstallMgr::installModule() is safe to be called concurrently? I'm finally getting around to fixing the module downloader in PS & am wondering if I need to queue installations of modules so only one call to InstallMgr::installModule() is made at any one time or if I can fire off several and have them all work on different threads? :)
>> 
>> Also, during my quick look at the code for it, there are bits where it says ftpCopy that are tagged to be changed to netCopy for v1.7.0 of SWORD. installmgr.cpp:300 has
>> // TODO: rename to netCopy
>> 
>> Thanks heaps, ybic
>> 	nic...  :)
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
> 
> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list