Message305953
Hi there
I recently stumbled on an interesting behaviour. I won't call it an error, because I think it's a mistake I made.
BACKGROUND: I want to spawn threads that handle pickled data. This works really well. However, I would like to execute the python script in question as a module, i.e. python -m mymodule. This is merely for aesthetic purposes.
The attached script has two functions:
1. Pickle/unpickle an instance of a `namedtuple`
2. Pickle/unpickle a string
Each of these functions are run in the main thread and then in subsequent spawned threads.
If I run the script attached with "python testqueuepickle.py", it works fine. I get the data pickled/unpickled in the respective functions and nothing deadlocks and everything is printed to screen. If, however, I run it with the "-m" option (python -m testqueuepickle.py) , the program deadlocks at the pickling of the "namedtuple" instance. The pickling/unpickling of the string appears to be unaffected.
Programming practices aside, what do you think could be the cause of this? |
|
Date |
User |
Action |
Args |
2017-11-09 10:14:19 | Werner Smidt | set | recipients:
+ Werner Smidt |
2017-11-09 10:14:19 | Werner Smidt | set | messageid: <1510222459.1.0.213398074469.issue31990@psf.upfronthosting.co.za> |
2017-11-09 10:14:19 | Werner Smidt | link | issue31990 messages |
2017-11-09 10:14:19 | Werner Smidt | create | |
|