Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added inline comment about dangers of multidomain usage#625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
filmor merged 2 commits intopythonnet:featuredfromJanKrivanek:patch-2
Oct 16, 2018
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionsAUTHORS.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,6 +23,7 @@
- David Lechner ([@dlech](https://github.com/dlech))
- Dmitriy Se ([@dmitriyse](https://github.com/dmitriyse))
- He-chien Tsai ([@t3476](https://github.com/t3476))
- Jan Krivanek ([@jakrivan](https://github.com/jakrivan))
- Jeff Reback ([@jreback](https://github.com/jreback))
- Joe Frayne ([@jfrayne](https://github.com/jfrayne))
- John Burnett ([@johnburnett](https://github.com/johnburnett))
Expand Down
1 change: 1 addition & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,6 +22,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
- Added `clr.GetClrType` (#432, #433)
- Allowed passing `None` for nullable args (#460)
- Added keyword arguments based on C# syntax for calling CPython methods (#461)
- Added detailed comments about aproaches and dangers to handle multi-app-domains (#538)

### Changed

Expand Down
7 changes: 7 additions & 0 deletionssrc/runtime/assemblymanager.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,6 +17,13 @@ internal class AssemblyManager
{
// modified from event handlers below, potentially triggered from different .NET threads
// therefore this should be a ConcurrentDictionary
//
// WARNING: Dangerous if cross-app domain usage is ever supported
// Reusing the dictionary with assemblies accross multiple initializations is problematic.
// Loading happens from CurrentDomain (see line 53). And if the first call is from AppDomain that is later unloaded,
// than it can end up referring to assemblies that are already unloaded (default behavior after unload appDomain -
// unless LoaderOptimization.MultiDomain is used);
// So for multidomain support it is better to have the dict. recreated for each app-domain initialization
private static ConcurrentDictionary<string, ConcurrentDictionary<Assembly, string>> namespaces =
new ConcurrentDictionary<string, ConcurrentDictionary<Assembly, string>>();
//private static Dictionary<string, Dictionary<string, string>> generics;
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp