[sword-devel] InstallMgr question
Troy A. Griffitts
scribe at crosswire.org
Wed May 29 20:46:18 MST 2013
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
More information about the sword-devel
mailing list