[vlc-devel] blocks and llvm?

Andre-John Mas ajmas at sympatico.ca
Thu Dec 17 15:03:32 CET 2009


On 17-Dec-2009, at 01:43, Rémi Denis-Courmont wrote:

> 
>   Hello,
> 
> On Wed, 16 Dec 2009 23:05:29 -0500, Andre-John Mas <ajmas at sympatico.ca>
> wrote:
>> Has anyone looked into using blocks and llvm for coding? This would allow
>> for use of Grand Central Dispatch, which is standard on MacOS X and being
>> looked at for Linux and BSD - from what I read.
> 
> Well the key questions, I think, are:
> 
> Does GCD work with already multi-threaded programs (using POSIX threads)?
> What happens if GCD is _not_ available?

From what I understand a block allows a developer to specify a unit of work
that the runtime environment will then assign to the available processing
cores, whether this be the CPU, the GPU or something else.

Personally, I have never dealt with it as a low level. From what I understand
you can still use blocks without the presence of GCD, though they will be
handled differently.

A few links, for those who have time, on Block and GCD:
   - http://www.mikeash.com/?page=pyblog/gcd-is-not-blocks-blocks-are-not-gcd.html
   - http://developer.apple.com/mac/articles/cocoa/introblocksgcd.html

As for other platforms:
   - http://arstechnica.com/open-source/news/2009/09/apple-opens-gcd-challenges-impede-adoption-on-linux.ars
   - http://lists.macosforge.org/pipermail/libdispatch-dev/2009-September/000059.html

André-John




More information about the vlc-devel mailing list