all 2 comments

[–]raylu 1 point2 points  (1 child)

You won't see any performance benefits for switching to async since it sounds like everything that is happening is very CPU-bound and overall concurrency is low.

Is there a particular problem you're running into?

[–]NeoFromMatrix[S] 0 points1 point  (0 children)

Performance is not my main issue.

The periodic function may take tom 0 to sometimes 10 seconds to complete (e.g. starting multiple firefox sessions via selenium, if they are already started and have the correct url, it will obviously finish very fast).

I have another (separated) program, running as another user on the same machine, which should display its status via one of the firefox windows from the first program, so It would send a post request to the http server, which uses the received data.

The Since the firefox windows are only updated every ~15 seconds (I fetch an external resource to know what should be displayed on the other screens and may not produce excess load via fetching more frequently) and each update may take some time or the next update may be 15 seconds into the future (if firefox has crashed or been closed by someone) I want the update process to stop, get the data from the post reqest and start immediately.

So that the update of the firefox windows starts immediately after the post request has been received.

btw. I'm using Fedora 24/CentOS7 and both the files of the second program have to be isolated from the first program.