File tree 3 files changed +11
-0
lines changed
3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 26
26
- Dmitriy Se ([ @dmitriyse ] ( https://github.com/dmitriyse ) )
27
27
- He-chien Tsai ([ @t3476 ] ( https://github.com/t3476 ) )
28
28
- Ivan Cronyn ([ @cronan ] ( https://github.com/cronan ) )
29
+ - Jan Krivanek ([ @jakrivan ] ( https://github.com/jakrivan ) )
29
30
- Jeff Reback ([ @jreback ] ( https://github.com/jreback ) )
30
31
- Joe Frayne ([ @jfrayne ] ( https://github.com/jfrayne ) )
31
32
- John Burnett ([ @johnburnett ] ( https://github.com/johnburnett ) )
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
19
19
- Catches exceptions thrown in C# iterators (yield returns) and rethrows them in python ([ #475 ] [ i475 ] )([ #693 ] [ p693 ] )
20
20
- Implemented GetDynamicMemberNames() for PyObject to allow dynamic object members to be visible in the debugger ([ #443 ] [ i443 ] )([ #690 ] [ p690 ] )
21
21
- Incorporated reference-style links to issues and pull requests in the CHANGELOG ([ #608 ] [ i608 ] )
22
+ - Added detailed comments about aproaches and dangers to handle multi-app-domains ([ #625 ] [ p625 ] )
22
23
23
24
### Changed
24
25
@@ -683,4 +684,5 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
683
684
[ p225 ] : https://github.com/pythonnet/pythonnet/pull/225
684
685
[ p78 ] : https://github.com/pythonnet/pythonnet/pull/78
685
686
[ p163 ] : https://github.com/pythonnet/pythonnet/pull/163
687
+ [ p625 ] : https://github.com/pythonnet/pythonnet/pull/625
686
688
[ i131 ] : https://github.com/pythonnet/pythonnet/issues/131
Original file line number Diff line number Diff line change @@ -17,7 +17,15 @@ internal class AssemblyManager
17
17
{
18
18
// modified from event handlers below, potentially triggered from different .NET threads
19
19
// therefore this should be a ConcurrentDictionary
20
+ //
21
+ // WARNING: Dangerous if cross-app domain usage is ever supported
22
+ // Reusing the dictionary with assemblies accross multiple initializations is problematic.
23
+ // Loading happens from CurrentDomain (see line 53). And if the first call is from AppDomain that is later unloaded,
24
+ // than it can end up referring to assemblies that are already unloaded (default behavior after unload appDomain -
25
+ // unless LoaderOptimization.MultiDomain is used);
26
+ // So for multidomain support it is better to have the dict. recreated for each app-domain initialization
20
27
private static ConcurrentDictionary < string , ConcurrentDictionary < Assembly , string > > namespaces ;
28
+
21
29
//private static Dictionary<string, Dictionary<string, string>> generics;
22
30
private static AssemblyLoadEventHandler lhandler ;
23
31
private static ResolveEventHandler rhandler ;
You can’t perform that action at this time.
0 commit comments