Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88250 > unrolled thread
| Started by | Thorsten Kampe <thorsten@thorstenkampe.de> |
|---|---|
| First post | 2015-03-29 10:11 +0200 |
| Last post | 2015-03-29 10:11 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Run two processes in parallel Thorsten Kampe <thorsten@thorstenkampe.de> - 2015-03-29 10:11 +0200
| From | Thorsten Kampe <thorsten@thorstenkampe.de> |
|---|---|
| Date | 2015-03-29 10:11 +0200 |
| Subject | Run two processes in parallel |
| Message-ID | <mailman.301.1427617205.10327.python-list@python.org> |
Hi,
I'd like to run two processes concurrently (either through a builtin
module or a third-party). One is a "background" task and the other is
displaying a spinner (for which I already found good packages).
The two processes do not have to communicate with each other; only
the second should be able to know when the first has terminated. To
make it clear, this is the pseudo-code:
```
import time, PARALLEL, spinner
process1 = PARALLEL.start(time.sleep(60))
while process1.isrunning
spinner.update()
time.sleep(1)
print('done')
```
>From what I see, Python modules threading and multiprocessing seem
either not suited for that or to be too complicated (though I don't
have any experience with these and could be wrong). A search on PyPi
for parallel, background, and concurrent found too many.
What would you do? Which technique or module would you suggest?
Thorsten
Back to top | Article view | comp.lang.python
csiph-web