DARIAH-DE / TopicsExplorer

Explore your own text collection with a topic model – without prior knowledge.
https://dariah-de.github.io/TopicsExplorer
Apache License 2.0
62 stars 10 forks source link

Multiprocessing vs. threading #83

Open severinsimmler opened 5 years ago

severinsimmler commented 5 years ago

We have to run two processes in parallel, not one after the other:

  1. Start the topic modeling workflow.
  2. Render the modeling.html template, which displays current status updates to the user.

So far we did this with threading.Thread, which was no problem for Windows. You cannot (or should not?) kill threads, but this may be desired if you click the abort button. multiprocessing.Process has a terminate() method, which is currently implemented. But of course this doesn't work under Windows (why? therefore!)

In the branch threading is an implementation using threads (which was used to freeze v2.0), but you cannot abort the modeling process. We should either merge threading and disable the abort button for all users, or write a killable Thread class or something?

severinsimmler commented 5 years ago

http://python-responder.org/en/latest/tour.html#background-tasks