[Stackless] Question about channels
stephan.diehl at gmx.net
Wed Oct 16 15:28:18 CEST 2002
On Wednesday 16 October 2002 15:00, you wrote:
> > As far as I understand channels, they are always blocking, both with
> > reading and writing. Is there a possibility to make the channels
> > nonblocking?
> > I was thinking about writing a network simulator (just for the fun of it)
> > and it would come in handy to represent a network node by a tasklet that
> > has its own eventloop.
> Why does that mean you'd need nonblocking channels?
> What sorts of things do you expect to be doing?
Being a simulator, I could do this in any imaginable way possible and not
using stackless at all. But since I want to learn how to use stackless and
channels, I'd just want to get a feel for their usage.
Somehow (and that might be really a misconception on my part), channels
remind me of sockets and I'd like to use channels in exactly that way.
Lets say, I'd like to model a node as a tasklet that listens on two (virtual)
network cards. For every network card (or probably better: for every IP
address) I'd take a pair of channels, listen to the receiving ones and take
appropriate routing action on the received data. In order to do that, the
channels have to be nonblocking.
I'd just like to make my model as primitive as possible.
But then, maybe my question shows that I really don't know what I'm talking
Stackless mailing list
Stackless at www.tismer.com
More information about the Stackless