Shane Hathaway <shane@zope.com>: > I think it would be very reasonable to raise an error if a file's > close() method is called while another thread is executing a system > call involving that file. I don't think raising an exception is the right thing to do here. The closing thread hasn't really done anything wrong, it just happened to do the close at a moment that was inconvenient to another thread. I think the closing should simply be deferred until no operation on the file is in progress. Another thing -- is this problem confined to just closing? What if two threads perform some other operation on a file at the same time -- what stops them from interfering with each other? And whatever it is, why doesn't it stop closing from interfering with other operations? Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
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