Hello All. I did some reading about threads modules in CPAN, and some interesting things that I found: Thread::Tie - A module that is proof-of-concept, for replacing shared variable with other architecture. The most interesting thing in that module is that it create a "mother thread" as soon as possible, (for minimum memory waste) and duplicate it when it needs threads. Thread::Isolate - Create a thread, where you can eval command into. Only good if you have some task that you needed done that loads a lot of modules, and all these modules will be useless a second later. Thread::Use - for people who does not know about require and import?! Thread::Queue::Duplex - can act as a simple communication channel (two-directional) between threads. Thread::Queue::Multiplex - does the same as above, just as one-to-many relation. Thread::Needs - I think that this is the module that I was looking for. It makes Perl clone to a new thread only a specific list of modules. Possible problems can arise when few modules are opening threads. Also the whole process is dangerous, but that's OK. :-) Thread::Conveyor - moving data between threads - worth the reading.
And for the final - forks. A drop-in replacement for 'threads' that does everything that threads does, just with forking the process instead of playing with the interpreter. The writer claim that by relaying on the OS's copy-on-write mechanism, his way saves memory better then threads. Btw, who is Elizabeth Mattijsen? She wrote lot of modules about threads. Shmuel. >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf >Of Shmuel Fomberg >Sent: Friday, August 24, 2007 5:45 PM >To: [email protected] >Subject: [Israel.pm] module threads? > >Hello There. > >I though about something, and want your opinion. >Most of the threads that I've seen until now do not "exit" from the same >file where they were created. >So I though that it will be interesting to have "module threads", that >instead of duplicating the Perl interpreter, just clone the file that >the thread is created in. then, is the thread need any other modules, it >can require them. > >Whet do you think? > >I looked on the code, and it will be hell to implement. (well, >implementing will be easy. To understand what is going on there is... >hell.) > >Shmuel. > >_______________________________________________ >Perl mailing list >[email protected] >http://perl.org.il/mailman/listinfo/perl > > >-- >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.484 / Virus Database: 269.12.4/969 - Release Date: 23/08/2007 >16:04 _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl
