Daniel McBrearty wrote:

> thanks Bill. but why is it so inadvisable? I don't get it. I'd have
> thought that some app where you want one task to execute periodically
> while another responds to user input was exactly where you should use
> threads. (I'll look into your suggestions though.)

I agree if you're on a platform that has a solid threads implementation.
I haven't seen that on Win32 yet.  Sockets by themselves seem pretty
good (in a single thread app) on Win32.

> It seems to be some weirdness in dealing with a socket very
> differently to other file handles eg STDOUT. Can anyone explain what's
> going on underneath this?

Don't forget that Perl is a UNIX based app and when porting to Win32, a
lot of kludges had to be made.  On UNIX all file handles can be treated
pretty much the same - not so on Win32 - sockets are treated differently
than the STDxxx or even file handles.  Actually sockets are closer to
UNIX than other file handles are.

I so far have avoided forking and threads as much as possible on Win32.
Maybe in the future we can get something that is more compatible, but
I don't think we're there yet.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to