[Bf-committers] Re: listener object (Martin DeMello)

Martin DeMello martindemello at gmail.com
Wed May 11 15:15:28 CEST 2005


On 5/11/05, Toni Alatalo <antont at kyperjokki.fi> wrote:
> 
> and using select(), which works on windows too for sockets (but not for
> reading files like on posix), the networking does not demand threading

Thanks - I didn't know that.

> either - you can just use it to see if there is incoming data, and read as
> much as is considered sane during one run, process it, and return control
> back to Blender. for example,
> http://www.tol.oulu.fi/~antont/programming/singlethreaddownload.py
> reads a file from the web 1024 bytes at a time to not block e.g. a game
> that'd be running in the same (only) thread.

That's a great idea. Basically, I'm taking the stance that it's the
script's responsibility not to block Blender. I was a bit confused
about the script thread issue, but if they run one at a time it makes
things a lot simpler conceptually.

martin


More information about the Bf-committers mailing list