* uia2atk/UiaDbus/ndesk-dbus/Mapper.cs: Fix dbus thread safety issues
* at-spi-sharp/ndesk-dbus/Mapper.cs: Fix dbus thread safety issues svn path=/trunk/at-spi-sharp/; revision=150760
This commit is contained in:
Родитель
8df94e73d3
Коммит
bf9b0b81ba
|
@ -1,3 +1,7 @@
|
|||
2010-02-03 Matt Guo <matt@mattguo.com>
|
||||
|
||||
* ndesk-dbus/Mapper.cs: Fix dbus thread safety issues
|
||||
|
||||
2009-12-09 Stephen Shaw <sshaw@decriptor.com>
|
||||
|
||||
* configure.ac: Changed version to 0.9.1
|
||||
|
|
|
@ -190,21 +190,23 @@ namespace NDesk.DBus
|
|||
static List<Type> genTypes = new List<Type> ();
|
||||
internal static Type GetGenericType (Type defType, Type[] parms)
|
||||
{
|
||||
foreach (Type genType in genTypes) {
|
||||
if (genType.GetGenericTypeDefinition () != defType)
|
||||
continue;
|
||||
|
||||
Type[] genParms = genType.GetGenericArguments ();
|
||||
|
||||
if (!AreEqual (genParms, parms))
|
||||
continue;
|
||||
|
||||
return genType;
|
||||
lock (genTypes) {
|
||||
foreach (Type genType in genTypes) {
|
||||
if (genType.GetGenericTypeDefinition () != defType)
|
||||
continue;
|
||||
|
||||
Type[] genParms = genType.GetGenericArguments ();
|
||||
|
||||
if (!AreEqual (genParms, parms))
|
||||
continue;
|
||||
|
||||
return genType;
|
||||
}
|
||||
|
||||
Type type = defType.MakeGenericType (parms);
|
||||
genTypes.Add (type);
|
||||
return type;
|
||||
}
|
||||
|
||||
Type type = defType.MakeGenericType (parms);
|
||||
genTypes.Add (type);
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче