[sword-devel] Abort module installation via API + Custom network timeouts

Jaak Ristioja jaak at ristioja.ee
Sat Aug 8 04:54:07 EDT 2020


On 08.08.20 10:30, Tobias Klein wrote:
> Is there a way to abort a module installation via the SWORD API?
> I saw in InstallMgr::installModule that there is some handling for when
> the user aborted the process. But it doesn't seem like this is
> controlled via the API.

"Yes" - see the bool term member of the RemoteTransport class.

Does it work properly? - No, because the change to the regular bool
member might not reach the other execution thread due to caching etc CPU
effects. Sword++ switched to std::atomic<bool> to fix this case:


https://github.com/swordxx/swordxx/commit/b253a8888c1dc683ea93b38efce0f6113dea9b47

There is a similar issue regarding aborting of indexing.

> One typical use case would be that the user's download speed is
> currently slower then acceptable (whether due to internet issues or
> server issues). In this case, instead of waiting "forever" one may want
> to abort a download/installation.

Network issues (connections hanging etc) is how we first discovered this
issue with BibleTime long time ago. The user gets stuck in the download
dialog and had no means even to navigate away from it. The only possible
way is to kill the offending BibleTime process.

> Also, another question in the same context: Is it possible to configure
> a custom timeout for the download of modules? What happens if a
> repository server goes down? I remember one time when the Xiphos repo
> was not available, waiting times seemed to be too long in the frontend
> (based on long default timeouts in SWORD?).

As far as I know it is currently not possible to configure a timeout, so
it might just hang indefinitely. ;-(


Best regards,
J


More information about the sword-devel mailing list