[sword-devel] Thread safety and other problems of installmgr
Eeli Kaikkonen
eekaikko at mail.student.oulu.fi
Fri Jan 30 10:10:05 MST 2009
The installmgr with libcurl isn't thread safe. It has - as the whole mgr
with any ftpmgr - another problem, too: it's not possible to cancel
downloading at any time. The installmgr has terminate() but it only sets
a flag which is checked after each file has been downloaded. It means
that stalled or slow downloading can't really be cancelled.
Libcurl has "multi" interface which could enable threaded usage. Now the
installmgr uses "easy" which is not meant for concurrent downloads.
If we want the installmgr to work with threads it should have a thread
safe terminate() which calls ftpmgr's thread safe terminate() which
calls underlying ftp library's thread-safe connection termination function.
Writing an ftpmgr implementation inside an app can solve this problem
because it can be terminated directly from the app code.
--Eeli Kaikkonen
More information about the sword-devel
mailing list