Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Apr 2014 06:21:08 -0700
From:      Neil Schroeder <gigneil@gmail.com>
To:        Baptiste Daroussin <bapt@freebsd.org>
Cc:        Ivan Klymenko <fidaj@ukr.net>, "ports@freebsd.org" <ports@freebsd.org>, "x11@freebsd.org" <x11@freebsd.org>
Subject:   Re: [CFT] x11-servers/xorg-server with initial (GCD) Grand Central Dispatch support
Message-ID:  <CAK9pY-x2TM9FpcpbqsNwcvwcVtWi6rmhcprAn3S-_z5krV%2B%2BhQ@mail.gmail.com>
In-Reply-To: <20140423065824.GE63561@ivaldir.etoilebsd.net>
References:  <20140420200534.72226779@nonamehost.local> <20140423065824.GE63561@ivaldir.etoilebsd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Yes you can use callbacks and delegates.

Blocks are much more elegant - they will handle the context and alloc and
derefrencing and a lot of just ugly moving of data.

A block wrapped API  is amazing - you  need to define a block one time per
function - not  per call like a callback -  and you're done. So much less
code.

Callbacks will be faster - although blocks may be optimized enough now to
be materially the same. I would do a little testing.

Will libdispatch itself even build in those older compiler environments ?
 I haven't looked.

On Tuesday, April 22, 2014, Baptiste Daroussin <bapt@freebsd.org> wrote:

> On Sun, Apr 20, 2014 at 08:05:34PM +0300, Ivan Klymenko wrote:
> > Hi all.
> >
> > You are tired of frequent friezes xorg server?
> > Are you bored messages in /var/log/Xorg.0.log:
> > "
> > ...
> > [mi] EQ overflowing.  Additional events will be discarded until existing
> events are processed.
> > ...
> > "
> > ?
> >
> > :)
> >
> > Then you here! :)
> >
> > Patch attached :)
> >
> > If you like, we can continue to develop this area.
> >
> > Thanks
>
>
> Thank you for those patches, imho that is something we really do need. I
> would
> just have a couple of side notes:
> Wouldn't it be possible to use callbacks in the dispatch call rather than
> blocks? that will make the patch work on FreeBSD 8, 9, 10 and head with
> clang
> AND gcc, which will greatly improves the chances to see those patch well
> tested
> and used enough to finally be incorporated in the ports.
>
> regards,
> Bapt
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAK9pY-x2TM9FpcpbqsNwcvwcVtWi6rmhcprAn3S-_z5krV%2B%2BhQ>