Re: [gtk-vnc-devel] [RFC] GThread based coroutines



On Tue, Dec 18, 2007 at 10:51:05PM -0500, Anthony Liguori wrote:
> Hi,
> 
> Attached a thread-based coroutine implementation.  This should make the 
> Windows port much easier.  I've tested it with gvncviewer and vinagre 
> (with multiple tabs) so I think it works pretty well.  The basic idea is 
> to use a GCond and GMutex to run all threads in lock-step.  It was 
> tricky getting the ucontext coroutines working properly so 
> testing/review is greatly appreciated!

The thread code looks like a pretty straightforward setup to me.

> Also, I'm hoping someone who has a bit more autoconf foo can help me 
> with the proper autoconf/automake integration.  We need to detect 
> ucontext in configure and if it's available, compile in 
> ucontext_coroutine.[ch], continuation.[ch].  Otherwise, we need to add a 
> dependency to gthread-2.0 and compile in gthread_coroutine.[ch].

Yep, I can do that pretty easily, but your patch seems to be incomplete.
It only has the removal of existing code & addition of gthread_coroutine,
but not the re-addition of ucontext_coroutine.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]