>>>>> "BAW" == Barry A Warsaw <barry@python.org> writes: BAW> Except that it's not, because of the lack of atomic BAW> acquire-and-enter-try. BAW> You could probably code this specific example like so: BAW> try: BAW> lock.acquire() dosomething() BAW> finally: BAW> try: BAW> lock.release() BAW> except NotLocked: BAW> pass BAW> but you still have the problem of ironclad resource release in BAW> other situations, such as the cursor opening scenario (I think) BAW> I posted before. BAW> Brett (I think) suggested that there may be alternatives to a BAW> syntactic approach, e.g. one that prohibits thread switching BAW> between the resource acquisition and the entering of the try. BAW> That might be interesting to explore, but I worry about BAW> deadlock possibilities. There was a good paper on this subject at LL2. You can find it here: http://www.cs.williams.edu/~freund/papers.html Jeremy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4