[Mono-osx] Mono OSX thread

Miguel de Icaza miguel at novell.com
Mon Jan 3 09:06:39 EST 2011


Hello,

    This looks like something is blocking on the event queue, preventing
events from being dispatched.   I know this was a bug a few years ago, but I
thought we had fixed this.

Miguel

On Mon, Jan 3, 2011 at 8:31 AM, sebi77 <
balazs.sebestyen at webcamlaboratory.com> wrote:

>
> When I move the mouse over the window, the program runs much faster (cc. 3
> times). (Or refreshes more frequently). This is a real time webcam
> .Net/Mono
> application running on a MacBook. On Windows works perfectly. The code:
>
> Thread t = new Thread(Foo);
> t.Priority = ThreadPriority.Highest; // doesn't do anything,
> t.Start();
> ..
> delegate void SetInt(int k);
> void Foo()
> {
>    int k = 0;
>    while (true)
>    {
>        ++k;
>        BeginInvoke(new SetInt(Bar), k);
>    }
> }
> void Bar(int k)
> {
>    Graphics.FromImage(pictureBox1.Image).DrawString(k.ToString(),
>        System.Fonts.DefaultFont, Brushes.Red, 0, 0);
>    pictureBox1.Invalidate();
> }
>
> The real code is a bit more complicated, eg. watches reentrance in Bar(). I
> know that Thread.Priority is not implemented in Mono, but must be a
> solution, otherwise every real-time application would be unusable in
> Mono+OSX. I don't want extra priority for my app, just as much as it has
> when the mouse is moving.
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/Mono-OSX-thread-tp3171952p3171952.html
> Sent from the Mono - OSX mailing list archive at Nabble.com.
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110103/bb86022b/attachment.html 


More information about the Mono-osx mailing list