[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Comments on ‘wip-nio’
From: |
Neil Jerram |
Subject: |
Re: Comments on ‘wip-nio’ |
Date: |
Sun, 25 Mar 2012 21:17:55 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Andy Wingo <address@hidden> writes:
> On Thu 22 Mar 2012 22:36, Neil Jerram <address@hidden> writes:
>
>> It seems like the module has to anticipate the main loop infrastructure
>> that any using programs will use - which isn't a nice solution.
>
> How about, you write your code in such a way that it deals with eports.
> You could surround your code in a prompt that if an eport operation
> aborts because it would block, you save the continuation and ask your
> main loop to call you again when the port is readable / writable. When
> it calls you again you resume the partial continuation.
>
> If you need to sleep, you use sleep from (ice-9 ethreads). Somehow we
> make it so that ethreads can use other main loops, like the dbus, efl,
> etc loops.
>
> Dunno. So many possibilities!
Thanks for the ideas. I unfortunately have a bit of a cognitive deficit
backlog before I can understand them fully. I haven't yet understand
prompts properly, and I see that ethreads are built on top of those.
But I'll continue working at it!
Neil
Re: Comments on ‘wip-nio’, Andreas Rottmann, 2012/03/31
Re: Comments on ‘wip-nio’, Andy Wingo, 2012/03/23