Osvaldo Santana Neto added the comment:
Hi Serhiy Storchaka,
I need to thank you for your valuable guidance.
--
___
Python tracker
<http://bugs.python.org/issue30
Osvaldo Santana Neto added the comment:
Pull Request #2409 (https://github.com/python/cpython/pull/2409) opened.
--
pull_requests: +2457
___
Python tracker
<http://bugs.python.org/issue30
Osvaldo Santana Neto added the comment:
New version of patch:
1. Use RLock instead of Lock (Mark & Antoine recomendation)
2. Add lock acquire at `__setitem__` and `__delitem__` as following (Mark &
Antoine recomendation)
3. Add lock protection in `__repr__` implementation.
I've s
Osvaldo Santana Neto added the comment:
This is an alternative implementation using `threading.Lock()`. The main issue
with this implementation relies on the fact that we've to import the
`threading` module during CPython interpreter loading (currently it's not
imported by default)
Osvaldo Santana Neto added the comment:
This patch implements a lock protection (as suggested by Antoine) using
`_thread.allocate_lock()` module (instead of `threading.Lock()`) due to the
fact that CPython interpreter already imports `_thread` module during its
bootstrap process
Osvaldo Santana Neto added the comment:
There are exceptions being raised in many applications (as reported here and in
http://bugs.python.org/issue25641) and there are three paths to follow:
1. We handle this exception somewhere;
2. We avoid raising it;
3. Just leave it. I don't care
Osvaldo Santana Neto added the comment:
I agree with Jelle about the fix's implementation. But I disagree of suggestion
to implement lock at the application side.
I disagree because some external libraries may want to access os.environ in a
concurrent fashion without lock acquiring. T
New submission from Osvaldo Santana Neto:
We're facing ocasional RuntimeError exceptions in a multithreaded application
when one of the threads creates new entries to the environment (os.environ).
I'm not so sure if the attached patch fixes this issue the right way, so, feel
free
Osvaldo Santana Neto added the comment:
Hi Tim,
I tried to find more information in documentation before opening this bug but I
need to confess that I didn't read the footnote.
Thanks and sorry for the invalid report.
--
resolution: -> invalid
status: open -
New submission from Osvaldo Santana Neto:
The following doctest should pass, but it fails:
>>> def spam(): print("eggs")
...
>>> assert spam()
eggs
Traceback (most recent call last):
AssertionError
But if we remove the print output from p
10 matches
Mail list logo