BibleGet-I-O / bibleget-openoffice

BibleGet I/O Project plugin for Open Office
Apache License 2.0
2 stars 1 forks source link

synchronization of threads #20

Closed JohnRDOrazio closed 3 years ago

JohnRDOrazio commented 3 years ago

Issue #18 can almost be closed. However there is this one issue that needs to be dealt with first. There seems to be some trouble in synchronizing threads when issuing bash commands using ProcessBuilder and ExecutorService. The output of the bash command never completes in the StreamGobbler thread, which is unable to operate on the BibleGetIO.sysPkgsNeeded ArrayList in the main thread. How to deal with this? (more details of who, when, where and what coming soon)

JohnRDOrazio commented 3 years ago

Actually the problem here wasn't just a synchronization of threads, it was because I was using a List rather than an ArrayList, and Lists are immutable. An ArrayList was needed in order to be able to remove elements. Fixed in commit a90f39ee3b967308d187732fa52e5494ef252695