Replies: 1 comment 1 reply
-
I think you are getting an error, and likely a traceback. However when Textual runs, it captures stdout / stderr so that print statements don't write over the UI. Try setting In general though, I'd recommend asyncio subprocesses over multiprocessing. It's slightly lower level, bit gives you more control, and is known to work with with Textual. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Spawning a
multiprocessing.Process
from within a worker thread seems to somehow disturb theexitcode
of the process:Importantly: The same code works nicely, if the process is spawned from within the main thread (just remove the
@work(exclusive = True, thread = True)
line).Work-around: The obvious work-around is to use a Pipe for the exitcode, but it is a workaround:
Update: I can't reproduce the issue with the regular
threading
module. The MWE above works nicely if the process is spawned from a thread created using thethreading
module. This issue must be somehow related to Textual, indeed?Beta Was this translation helpful? Give feedback.
All reactions