TopicsExplorer icon indicating copy to clipboard operation
TopicsExplorer copied to clipboard

Multiprocessing vs. threading

Open severinsimmler opened this issue 7 years ago • 1 comments

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 avatar Nov 25 '18 15:11 severinsimmler

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

severinsimmler avatar Dec 01 '18 15:12 severinsimmler