Re: [Mono-devel-list] Re: Threading model
Hi, How do I use Control.Invoke within my code and I'm not sure this explains the r00t access the code gave me. And you really think that Mono gave you root access? ;-) No. I suspect a problem with the threading model or the kernel itself, but before I make a total gimboid of myself, I need to check everything first. I start with the software which caused the problem and work down. TTFN Paul -- Some people will do anything for a woman in uniform - The Doctor - Unregenerate (Big Finish audio) ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Re: Threading model
Hi, Thanks for the heads up on that. I've looked at the C++ version at http://samples.gotdotnet.com/quickstart/util/srcview.aspx?lbLangPref=CPpath=/quickstart/howto/Samples/WinForms/ThreadMarshal/ThreadMarshal.src but I'm not sure if I've got this right. My thread code looks like this public void run() { while (true) { try { Monitor.Enter(this); t1.Text = (++count1).ToString(); t2.Text = (++count2).ToString(); } finally { Monitor.Exit(this); } Thread.Sleep(500); } } would I be correct in thinking that I would need to change this to MethodInvoker mi = new MethodInvoker(this, Monitor.Enter); while (true) { this.BeginInvoke(mi); t1.Text = (++count1).ToString(); t2.Text = (++count2).ToString(); Thread.Sleep(500); } Problem is, this doesn't quite seem right. Also, how do I change this if I use lock()? TTFN Paul -- Some people will do anything for a woman in uniform - The Doctor - Unregenerate (Big Finish audio) signature.asc Description: This is a digitally signed message part ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Re: Threading model
Hi, This modified version of your ugly program runs for a while (hundreds of increments): Ugly? It's hacked together with bits of Blutak and sticky tape! Probably some error on locking/freeing threads is generating this exception Worth putting into the big scaly one? Hope it helps, It does. Thanks to everyone who's helped me on this one. You are all invited to Haydock for a cup of coffee and slice of cake when you're next passing. TTFN Paul http://www.streetmap.co.uk/newmap.srf?x=355336y=396695z=0sv=WA110JLst=2pc=WA11+0JLmapp=newmap.srfsearchp=newsearch.srf (St Helens, Merseyside - I live to the left of the pointy arrow somewhere!) -- Some people will do anything for a woman in uniform - The Doctor - Unregenerate (Big Finish audio) signature.asc Description: This is a digitally signed message part ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Re: Threading model
On 8/5/05, Paul [EMAIL PROTECTED] wrote: Probably some error on locking/freeing threads is generating this exception Worth putting into the big scaly one? If you mean open a bugzilla case it is certainly worth as it meanders in the Platform Driver code for X before crashing... Could you do the honors? Your small program, fits nicely as a test case... :) -- Rafael Monoman Teixeira --- I'm trying to become a Rosh Gadol before my own eyes. See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment. It hurts! ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list