Shlomi Fish wrote:
I would really recommend against using threads:
* http://perldoc.perl.org/perlthrtut.html
* http://www.perlmonks.org/index.pl?node_id=288022
They don't work as expected in Perl (though in C/C++, .NET and/or Java, they
may be an option[Thr]), and cause too many problems. If you are keen on doing
multi-tasking you should use either fork() and multi-processing or something
like http://poe.perl.org/ , but often multi-tasking is the wrong solution for
the problem.
You can't use fork() in Windows. When you do, it actually uses threads
emulate fork(). This is because of the overhead in registering a new
Windows process with Windows (which is why threads were invented in the
first place).
Many of the complaints of threads have been address. For example they
now do copy-on-write, the same as fork().
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
I like Perl; it's the only language where you can bless your
thingy.
Eliminate software piracy: use only FLOSS.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/