This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients brett.cannon, eric.snow, ncoghlan
Date 2017-07-11.01:22:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1499736137.19.0.973776620292.issue30893@psf.upfronthosting.co.za>
In-reply-to
Content
Based on https://github.com/python/cpython/pull/2646/files#r126574323, I'm actually thinking along different lines: I'm starting to think we should move the current sys.modules to sys._modules, and make sys.modules a synchronised wrapper that does the following for all get/set/delete operations:

  # Acquires the global import lock
  # Acquires the relevant module lock
  # Releases the global import lock
  # Mutates sys._modules
  # Releases the module lock

That said, I'm not sure that would be sufficient to give the desired level of atomicity, so exposing ModuleLockManager may actually be a better approach.
History
Date User Action Args
2017-07-11 01:22:17ncoghlansetrecipients: + ncoghlan, brett.cannon, eric.snow
2017-07-11 01:22:17ncoghlansetmessageid: <1499736137.19.0.973776620292.issue30893@psf.upfronthosting.co.za>
2017-07-11 01:22:17ncoghlanlinkissue30893 messages
2017-07-11 01:22:16ncoghlancreate