https://bugzilla.novell.com/show_bug.cgi?id=346136
User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=346136#c7 --- Comment #7 from Rolandas Rudomanskis <[EMAIL PROTECTED]> 2007-12-11 08:34:56 MST --- The sample code to get a crash. Uncomment the line (variable not used). using System; using System.Collections; using C5; using SCG = System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Threading; namespace GenericsTest { abstract class MapperBase<T> where T:class, new() { protected ArrayList<T> collection = new ArrayList<T>(); private SCG.Queue<SCG.KeyValuePair<T,int>> mapQueue; // Uncomment the next line and get a crash // private object syncRoot = new object(); protected abstract T Map(DataRow row, int query, ref T attachTo, out int queryNext); public C5.IList<T> Append(ref DataTable table, int query, T attachTo) { bool isNewObject = attachTo == null; foreach (DataRow row in table.Rows) { try { int q; T o = Map(row, query, ref attachTo, out q); if (q != null) { mapQueue.Enqueue(new SCG.KeyValuePair<T, int>(o, q)); } if (o != null && isNewObject) { collection.Add(o); } } catch { throw; } } return collection; } } } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
