Re: Threads in Perl

2015-07-06 Thread Kent Fredric
On 7 July 2015 at 16:41, Akshay Mohit wrote: > As I told earlier there is a code already written on Performance testing > using Perl threads and I need to maintain and own it because the person who > was doing it earlier left the organization, so I am bound to maintain the > code wh

Re: Threads in Perl

2015-07-06 Thread Akshay Mohit
As I told earlier there is a code already written on Performance testing using Perl threads and I need to maintain and own it because the person who was doing it earlier left the organization, so I am bound to maintain the code which is using threads and presently cant make use of any other

Re: Threads in Perl

2015-07-06 Thread Kent Fredric
On 7 July 2015 at 16:14, Akshay Mohit wrote: > I need to maintain a code for performance testing which is fully written > using Threads That doesn't seem to help me a lot. Because "Performance testing" in itself doesn't require threads. If you just need to load up p

Re: Threads in Perl

2015-07-06 Thread Akshay Mohit
Thanks Kent for the Quick reply. I need to maintain a code for performance testing which is fully written using Threads and I have no clue of the concepts so I wanted some stuffs for it. -Akshay On Tue, Jul 7, 2015 at 9:34 AM, Kent Fredric wrote: > On 7 July 2015 at 15:57, Akshay Mohit wr

Re: Threads in Perl

2015-07-06 Thread Kent Fredric
On 7 July 2015 at 15:57, Akshay Mohit wrote: > I am not so experienced in Perl and got a task to do in Threads. The first question you have to ask is "Why do you need threads". What are you doing? Many people go "I need some sort of parallel process" and go "that n

Threads in Perl

2015-07-06 Thread Akshay Mohit
Hi, I am not so experienced in Perl and got a task to do in Threads. Can anyone pls help me in knowing the Thread concepts in Perl so I can apply it for my task. Thanks in advance.! -Akshay

Re: Compilation 5.18.0 on RHEL 6.4 fails to use threads (?)

2013-09-19 Thread Alexander Karner
5.18.0 on RHEL 6.4 fails to use threads (?) On Thu, Sep 19, 2013 at 8:16 AM, Alexander Karner wrote: Hi! I got the list of options from there: http://mail.perlide.org/pipermail/padre-dev/2010-June/001863.html But I checked a compilation with sh Configure -des -Dusethreads -Dprefix=$HOME/s

Re: Compilation 5.18.0 on RHEL 6.4 fails to use threads (?)

2013-09-19 Thread Brian Fraser
ke finishes it's job > --> Make test > --> > [...snip...] > dist/Storable/t/threads ... ok > ... > dist/Thread-Queue/t/01_basic .. ok > dist/Thread-Queue/t/02_refs ..

Re: Compilation 5.18.0 on RHEL 6.4 fails to use threads (?)

2013-09-19 Thread Alexander Karner
.] Build a threading Perl? [y] [...snip...] --> Configure finishes it's job --> make finishes it's job --> Make test --> [...snip...] dist/Storable/t/threads ... ok ... dist/Thread-Queue/t/01_basic .

Re: Compilation 5.18.0 on RHEL 6.4 fails to use threads (?)

2013-09-18 Thread Brian Fraser
On Wed, Sep 18, 2013 at 10:02 AM, Alexander Karner wrote: > Hi! > While I'm not a beginner with Perl it seems that I'm somewhat a beginner > if it comes to compilation: > > I try to compile 5.18.0 on my RHEL 6.4 system. Primarily in order to be > able to use Padre. > This is the command to create

Compilation 5.18.0 on RHEL 6.4 fails to use threads (?)

2013-09-18 Thread Alexander Karner
Hi! While I'm not a beginner with Perl it seems that I'm somewhat a beginner if it comes to compilation: I try to compile 5.18.0 on my RHEL 6.4 system. Primarily in order to be able to use Padre. This is the command to create the configuration: sh Configure -de \ -Doptimize='-O2 -g -pipe -Wall

Re: is it possible to get only emails from this list for threads that I've started or replied ?

2013-05-28 Thread Jim Gibson
On May 28, 2013, at 1:31 AM, R. S. wrote: > Hello Gustavo, > > Tuesday, May 28, 2013, 2:05:27 AM, you wrote: > >> How do you will reply a message, if you will not receive it ? > > > I meant a setting that only the messages that are reply to me are send > to m

Re: is it possible to get only emails from this list for threads that I've started or replied ?

2013-05-28 Thread R. S.
Hello Gustavo, Tuesday, May 28, 2013, 2:05:27 AM, you wrote: > How do you will reply a message, if you will not receive it ? I meant a setting that only the messages that are reply to me are send to my email and those from threads in which there is my reply also be send like on web fo

Re: is it possible to get only emails from this list for threads that I've started or replied ?

2013-05-27 Thread Gustavo Telly
How do you will reply a message, if you will not receive it ? 2013/5/27 R. S. > I've send request to beginners-help but there seems to be no such > command. > > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http:/

is it possible to get only emails from this list for threads that I've started or replied ?

2013-05-27 Thread R. S.
I've send request to beginners-help but there seems to be no such command. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Benchmark.pm and threads ...

2013-02-15 Thread gator_ml
Hi, I use a simple little CPU-Benchmark based on the perl "Benchmark" module for rough performance comparison. Now I wanted to extend it to run the same test in parallel with a given number of threads. After I got totally unusable results, I stripped down the code for investigation:

Re: Passing socket descriptor between threads

2012-08-06 Thread William Ward
It looks like I may have answered my previous question. % cat listener_test #!/usr/bin/perl use strict; use threads; use IO::Socket; my $port = 11444; my $listener_thread = threads->new(\&listener); $listener_thread->join(); sub listener {         my $listening_socket = IO::Socket:

Passing socket descriptor between threads

2012-08-02 Thread William Ward
Hi All, Is there a way to pass a "socket descriptor" to another thread?   Here is an example of what is being attempted here: #!/usr/bin/perl use strict; use threads; use Socket; my $listener_thread = threads->new(\&listener); $listener_thread->join; sub listen

Re: Perl threads

2011-11-05 Thread Anneli Cuss
Hi Sharan, Have you considered using asynchronous events instead? You might find it's easier to work out. (See EV, Coro, AnyEvent, etc. in the CPAN) Otherwise, just.. read the manual on threads? - Anneli 2011/11/6 Sharan Basappa > Hello, > > We are in the process of writing

Perl threads

2011-11-05 Thread Sharan Basappa
type (e.g. slow/small traffic, small/fast traffic, large/infrequent traffic etc.) So, a mail program would spawn multiple threads and these threads would send events back to main thread. The main thread would then send traffic depending on the type of event it receives. Can someone let me know what

Re: timing out threads

2011-11-01 Thread Zachary Zebrowski
mmand line and wait for it to come back to me... Others your milage may vary... Good luck, Zak On Tue, Nov 1, 2011 at 8:23 PM, Danny Wong (dannwong) wrote: > Hi all, >I would like to perform the following, start X (say 10) number > of threads to perform some operation (ex. Co

timing out threads

2011-11-01 Thread Danny Wong (dannwong)
Hi all, I would like to perform the following, start X (say 10) number of threads to perform some operation (ex. Copy command), I would like to exit or return out of the thread(s) that takes too long ( ex. 30 minutes ). I'm thinking I should spawn an independent thread (a watch thread

Re: "Right way" of doing threads in Perl?

2011-08-03 Thread Dr.Ruud
On 2011-08-03 12:16, Deyan Ginev wrote: I have heard a lot of bashing of the thread support in Perl and tried it myself with limited success. For example, some months ago I tried the standard "use threads;" and remember seeing a segfault when it reached the "join" (but ev

"Right way" of doing threads in Perl?

2011-08-03 Thread Deyan Ginev
Hi all, I have heard a lot of bashing of the thread support in Perl and tried it myself with limited success. For example, some months ago I tried the standard "use threads;" and remember seeing a segfault when it reached the "join" (but everything worked well otherw

Re: help: segmentation fault in threads program that use binmode

2011-07-12 Thread a b
nders lee wrote: > > when i use binmode in threaded program, i got a segmentation fault; > > i comment the binmode line, the program works well > > > use threads; > use threads::shared; > > use utf8; > binmode(STDOUT, ':encoding(utf8)'; > >

Re: help: segmentation fault in threads program that use binmode

2011-06-17 Thread Shlomi Fish
Hi anders, On Wed, 15 Jun 2011 07:38:46 +0800 "anders lee" wrote: > > when i use binmode in threaded program, i got a segmentation fault; > > i comment the binmode line, the program works well > > > use threads; > use threads::shared; > > use

help: segmentation fault in threads program that use binmode

2011-06-14 Thread anders lee
when i use binmode in threaded program, i got a segmentation fault; i comment the binmode line, the program works well use threads; use threads::shared; use utf8; binmode(STDOUT, ':encoding(utf8)'; ---thread create and join- -- 使用 Opera 革命性的电子邮件客户程序: http://www

help: segmentation fault in threads program that use binmode

2011-06-08 Thread anders lee
when i use binmode in threaded program, i got a segmentation fault; i comment the binmode line, the program works well use threads; use threads::shared; use utf8; binmode(STDOUT, ':encoding(utf8)'; ---thread create and join- -- 使用 Opera 革命性的电子邮件客户程序: http://www

Re: batching and threads

2011-03-12 Thread Shlomi Fish
Hi "Unknown User", On Saturday 12 Mar 2011 16:27:27 Unknown User wrote: > I am looking for a module that will enable easy batching with perl > threads, somewhat like Parallel::ForkManager for forking in batches. > Does anybody know of such a module? Please see this previous

batching and threads

2011-03-12 Thread Unknown User
I am looking for a module that will enable easy batching with perl threads, somewhat like Parallel::ForkManager for forking in batches. Does anybody know of such a module? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Re: Threads and garbage collection

2011-02-23 Thread terry peng
>> defragmented? >> >> >> I just inherited 25K lines of perl code that uses lots of threads. A >> simple grep indicates they have about 100 thread->new statements. >> >> >> Back in 2005 Chris Devers responded to a similar post of mine and >>

Re: Threads and garbage collection

2011-02-23 Thread Shlomi Fish
inherited 25K lines of perl code that uses lots of threads. A > simple grep indicates they have about 100 thread->new statements. > > > Back in 2005 Chris Devers responded to a similar post of mine and > suggested I use fork & exec instead. > > > Do threads necessaril

Threads and garbage collection

2011-02-23 Thread siegfried
I apologize if this appears multiple times. When I did not see it appear, I posted again. Does perl have a feature like C# and Java where memory is reclaimed and defragmented? I just inherited 25K lines of perl code that uses lots of threads. A simple grep indicates they have about 100 thread

Re: perl's threads

2011-02-12 Thread Shlomi Fish
Hi Rob, well, if we are already discussing threads in general, and not in Perl in particular, I might as well contribute to the discussion. On Wednesday 09 Feb 2011 15:03:04 Rob Coops wrote: > Just adding a little to this discussion then. :-) > > Threads regardless of the language are

Re: perl's threads

2011-02-11 Thread Rob Coops
I have to agree I missed things a bit there :-( forks are simply a better way of dealing with threads then the default perl ithreads, the benefits forks offer goes far beyond the minimal drawbacks. By now the notes about modules that still insist on using threads rather then forks will for most

Re: perl's threads

2011-02-11 Thread Dr.Ruud
On 2011-02-09 14:03, Rob Coops wrote: > But any developer that tells you that threads are not worth the > trouble they cause or anything along those lines is clearly an > experienced programmer who unfortunately has not realized yet > that the computer world has changed incredibly o

Re: perl's threads

2011-02-09 Thread Rob Coops
Just adding a little to this discussion then. :-) Threads regardless of the language are meant to do multiple things in parallel. For instance I'm at the moment working on a tool that extracts vast amounts of data from a web service as the calls to that service are pretty much independent an

Re: perl's threads

2011-02-09 Thread Shlomi Fish
On Tuesday 08 Feb 2011 10:05:47 Dr.Ruud wrote: > On 2011-02-07 11:30, Shlomi Fish wrote: > > Threads work pretty well in C, though they are extremely tricky to get > > right for non-trivial programs > > That they work "pretty well" is probably about user experienc

Re: perl's threads

2011-02-09 Thread Dr.Ruud
On 2011-02-07 07:44, Octavian Rasnita wrote: From: "Dr.Ruud" On 2011-02-06 12:12, terry peng wrote: What's the suggested module for perl's threads? I have been using Perl 5.12 under linux. Stay away from threads. Design and develop in a way that no internal resources

Re: perl's threads

2011-02-09 Thread Dr.Ruud
On 2011-02-07 11:30, Shlomi Fish wrote: Threads work pretty well in C, though they are extremely tricky to get right for non-trivial programs That they work "pretty well" is probably about user experience of some heavily interactive system. But only if the user accepts crashes and

Re[2]: perl's threads

2011-02-07 Thread terry peng
Thanks Shlomi. Your statement is a great guide to perl threads to me. I'm checking the AnyEvent module which looks wonderful. Thanks again. Mon, 7 Feb 2011 12:30:32 +0200 письмо от Shlomi Fish : > > Well, let me quote the perlbot ( on Freenode's #perl ) fact

Re: perl's threads

2011-02-07 Thread Shlomi Fish
Hi Terry, On Monday 07 Feb 2011 02:32:49 terry peng wrote: > Sun, 06 Feb 2011 16:21:58 +0100 письмо от "Dr.Ruud" : > > On 2011-02-06 12:12, terry peng wrote: > > > What's the suggested module for perl's threads? > > > I have been using Perl 5.

Re: perl's threads

2011-02-06 Thread Octavian Rasnita
From: "Dr.Ruud" On 2011-02-06 12:12, terry peng wrote: What's the suggested module for perl's threads? I have been using Perl 5.12 under linux. Stay away from threads. Design and develop in a way that no internal resources (but read-only data) are shared. In a pro

Re: perl's threads

2011-02-06 Thread Shawn H Corey
On 11-02-06 07:32 PM, terry peng wrote: why no threads? I have been using threads in other language (like Java) for long time, I was thinking it's good. It depends on what your OS is. *NIX is designed to dispatch and recover processes. Windows does not fork well since every Wi

Re[2]: perl's threads

2011-02-06 Thread terry peng
Sun, 06 Feb 2011 16:21:58 +0100 письмо от "Dr.Ruud" : > On 2011-02-06 12:12, terry peng wrote: > > > What's the suggested module for perl's threads? > > I have been using Perl 5.12 under linux. > > Stay away from threads. Design and develop in a

Re: perl's threads

2011-02-06 Thread Dr.Ruud
On 2011-02-06 12:12, terry peng wrote: What's the suggested module for perl's threads? I have been using Perl 5.12 under linux. Stay away from threads. Design and develop in a way that no internal resources (but read-only data) are shared. -- Ruud -- To unsubscribe, e-mail:

Re[2]: perl's threads

2011-02-06 Thread terry peng
Sun, 06 Feb 2011 08:54:50 -0500 письмо от Shawn H Corey : > On 11-02-06 07:10 AM, Octavian Rasnita wrote: > > From: "terry peng" > >> What's the suggested module for perl's threads? > >> I have been using Perl 5.12 under linux. > >> &

Re: perl's threads

2011-02-06 Thread Shawn H Corey
On 11-02-06 07:10 AM, Octavian Rasnita wrote: From: "terry peng" What's the suggested module for perl's threads? I have been using Perl 5.12 under linux. Thanks. use threads; use threads::shared; use Thread::Queue; This module does the work of threads::shared.

Re: perl's threads

2011-02-06 Thread Octavian Rasnita
From: "terry peng" > What's the suggested module for perl's threads? > I have been using Perl 5.12 under linux. > > Thanks. use threads; use threads::shared; Octavian -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-ma

perl's threads

2011-02-06 Thread terry peng
What's the suggested module for perl's threads? I have been using Perl 5.12 under linux. Thanks.

Re: Perl Threads

2010-10-14 Thread a b
Thanks a lot All of your On Wed, Oct 13, 2010 at 6:21 AM, Brian Fraser wrote: > The usual elevator example: > http://www.perl.com/pub/2002/09/04/threads.html > > I'm not entirely sure if the article is dated (I used it a couple of months > back as a personal introduction t

Re: Perl Threads

2010-10-12 Thread Brian Fraser
The usual elevator example: http://www.perl.com/pub/2002/09/04/threads.html I'm not entirely sure if the article is dated (I used it a couple of months back as a personal introduction to threads in general, for whatever that counts), but if anything, the explanation on building a threaded

Re: Perl Threads

2010-10-11 Thread Alan Haggai Alavi
On Sunday 10 Oct 2010 20:38:32 chillidba wrote: > Can some body please point me to Perl Thread tutorials.(some pdf with > examples) Hi, perldoc perlthrtut http://perldoc.perl.org/perlthrtut.html Regards, Alan Haggai Alavi. -- The difference makes the difference. -- To unsubscribe, e-mail: be

Re: Perl Threads

2010-10-11 Thread Alan Haggai Alavi
On Sunday 10 Oct 2010 20:38:32 chillidba wrote: > Can some body please point me to Perl Thread tutorials.(some pdf with > examples) Hi, perldoc perlthrtut http://perldoc.perl.org/perlthrtut.html Regards, Alan Haggai Alavi. -- The difference makes the difference. -- To unsubscribe, e-mail: be

Fwd: Perl Threads 6D7-36A

2010-10-10 Thread marcos rebelo
Good and threads are hardly find together. Perl has a share nothing model. I would really consider to 'use forks', the syntax is similar and usually gets the work done. http://search.cpan.org/dist/forks/lib/forks.pm Best Regards Marcos Rebelo On Sun, Oct 10, 2010 at 5:08 PM, chilli

Re: Perl Threads

2010-10-10 Thread Shawn H Corey
On 10-10-10 11:08 AM, chillidba wrote: Hello Perl Masters, I couldn't find good stuffs on Perl Threads, Can some body please point me to Perl Thread tutorials.(some pdf with examples) Or if someone already have some small projects/examples please send me Thanks in Advance!! Regards,

Re: Perl Threads

2010-10-10 Thread marcos rebelo
Good and threads are hardly find together. Perl has a share nothing model. I would really consider to 'use forks', the syntax is similar and usually gets the work done. http://search.cpan.org/dist/forks/lib/forks.pm Best Regards Marcos Rebelo On Sun, Oct 10, 2010 at 5:08 PM, chilli

Perl Threads

2010-10-10 Thread chillidba
Hello Perl Masters, I couldn't find good stuffs on Perl Threads, Can some body please point me to Perl Thread tutorials.(some pdf with examples) Or if someone already have some small projects/examples please send me Thanks in Advance!! Regards, Perl Beginner

Re: Using References in Modules within threads

2010-04-08 Thread Rene Schickbauer
Steve Bertrand wrote: Hi! Well, working on windows does have its benefits. When something goes horribly wrong, you can always point the finger to Redmont and your users will believe you (not matter who's fault it really is)... I can tell you work in an Enterprise environment already ;) Yeah

Re: Using References in Modules within threads

2010-04-07 Thread Steve Bertrand
On 2010.04.07 19:19, Rene Schickbauer wrote: > Shawn H Corey wrote: >> Rene Schickbauer wrote: >>> Shawn H Corey wrote: >>> Personally, I don't see why anyone would want to run Windows. It's like trying to run a marathon while dragging a bus. >>> >>> For me, its mainly because it pays th

Re: Using References in Modules within threads

2010-04-07 Thread Rene Schickbauer
Shawn H Corey wrote: Rene Schickbauer wrote: Shawn H Corey wrote: Personally, I don't see why anyone would want to run Windows. It's like trying to run a marathon while dragging a bus. For me, its mainly because it pays the rent. I did say, "want to" not "have to" :) Well, working on w

RE: Using References in Modules within threads

2010-04-07 Thread Bob McConnell
From: Shawn H Corey >Shlomi Fish wrote: >> Nevertheless, if you are going to run Perl on UNIX systems exclusively, you >> shouldn't use threads. And if you're planning to do such multi-tasking on >> Windows using Perl - please reconsider. > > Personally,

Re: Using References in Modules within threads

2010-04-07 Thread Shawn H Corey
Rene Schickbauer wrote: Shawn H Corey wrote: Personally, I don't see why anyone would want to run Windows. It's like trying to run a marathon while dragging a bus. For me, its mainly because it pays the rent. I did say, "want to" not "have to" :) -- Just my 0.0002 million dollars wo

Re: Using References in Modules within threads

2010-04-07 Thread Rene Schickbauer
Shawn H Corey wrote: Personally, I don't see why anyone would want to run Windows. It's like trying to run a marathon while dragging a bus. For me, its mainly because it pays the rent. You know, girls sell their body, boys sell their soul. Or something like that. LG Rene -- To unsubscrib

Re: Using References in Modules within threads

2010-04-07 Thread Shawn H Corey
Shlomi Fish wrote: Nevertheless, if you are going to run Perl on UNIX systems exclusively, you shouldn't use threads. And if you're planning to do such multi-tasking on Windows using Perl - please reconsider. Personally, I don't see why anyone would want to run Windows. It&#x

Re: Using References in Modules within threads

2010-04-07 Thread Shlomi Fish
Hi Shawn, On Wednesday 07 Apr 2010 16:05:24 Shawn H Corey wrote: > 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 > >

Re: Using References in Modules within threads

2010-04-07 Thread Shawn H Corey
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 problem

Re: Using References in Modules within threads

2010-04-07 Thread Shlomi Fish
Hi, On Wednesday 07 Apr 2010 14:59:08 Frenzel, Joerg (ext) wrote: > Hello, > > I need help by using threads in combination with external packages > (modules). I would really recommend against using threads: * http://perldoc.perl.org/perlthrtut.html * http://www.perlmonks.org/inde

Using References in Modules within threads

2010-04-07 Thread Frenzel, Joerg (ext)
Hello, I need help by using threads in combination with external packages (modules). At main script threads were created and within these threads an database-handler was defined. My Intention is to use this database-handler within a method of the external module. The paramlist of my method

Re: IOScalar with threads dose not work

2010-03-24 Thread iizuka
Thank you for your comment, Shlomi. > 1. There's no such thing as IOScalar. Maybe you mean writing to an in-memory > buffer. Yes, in-memory buffer. That's what I meant. > 2. Don't use threads in Perl. They cause too many problems. Is there any workaround? to make mul

Re: IOScalar with threads dose not work

2010-03-24 Thread IIZUKA Soichi
Thanks for your help, shlomi. > 1. There's no such thing as IOScalar. Maybe you mean writing to an in-memory > buffer. Yes, in-memory buffer. That's what I meant. > 2. Don't use threads in Perl. They cause too many problems. Is there any workaround? to make multi-th

Re: IOScalar with threads dose not work

2010-03-23 Thread Jeff Peng
2010/3/23 Shlomi Fish : > > 2. Don't use threads in Perl. They cause too many problems. > Does it still have many problems until now? I ask it just because I wrote many code with Perl threads in my work, they seem work nice. -- Jeff Peng Email: jeffp...@netzero.net Skype: compu

Re: IOScalar with threads dose not work

2010-03-23 Thread Shlomi Fish
Hi iizuka! On Tuesday 23 Mar 2010 09:53:54 iiz...@sizk.net wrote: > I'm trying to make threaded Net::Telnet program. > I want all "input_log" to be written to one file. > So I tried to give an IOScalar FileHandle to "input_log", then output real > file late

IOScalar with threads dose not work

2010-03-23 Thread iizuka
I'm trying to make threaded Net::Telnet program. I want all "input_log" to be written to one file. So I tried to give an IOScalar FileHandle to "input_log", then output real file later. IOScalar works fine, threads works fine. But together dosen't work. Here is

Re: Sharing Object::InsideOut object between threads

2010-03-07 Thread menth0l
I've contacted module author on that matter and it turned out there was a bug in OIO 3.59. Fixed version 3.63 is already available on CPAN. -- menth0l -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Sharing Object::InsideOut object between threads

2010-03-04 Thread menth0l
as it should be? Is there some mistake in my code or does the documentation for Object::InsideOut lies about the thread- safety? Is there any other way to pass an *objects* between threads? -- menth0l -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beg

Re: threads & threads::shared & Threads::Semaphore

2010-01-08 Thread Aimee Cardenas
way through processing the data. Unfortunately, the data is very interconnected and the statistics I need to execute involves data from several of the hashes. I'm thinking of using threads & threads::shared in order to be able to process, store and access the data among several of 8 processors

Re: threads & threads::shared & Threads::Semaphore

2010-01-08 Thread Jim Gibson
y problems but now > that I've added a couple more hashes, I'm having memory issues. It > now runs out of memory when it's about half way through processing the > data. Unfortunately, the data is very interconnected and the > statistics I need to execute involves data from

threads & threads::shared & Threads::Semaphore

2010-01-08 Thread Aimee Cardenas
w runs out of memory when it's about half way through processing the data. Unfortunately, the data is very interconnected and the statistics I need to execute involves data from several of the hashes. I'm thinking of using threads & threads::shared in order to be able to proces

Sharing objects between threads.

2009-11-03 Thread Prasad Joshi
Hi All, I want to create few threads and want to share objects of class between threads. Although there is a package Thread::Queue but it only allows sharing of scalar data. I tried sending data as a reference parameter to thread but seems like it is passed as value to thread function. Here is

Query on Threads, receiving Segment Fault.

2009-11-02 Thread Prasad Joshi
} # create threads and pass thread function ssh object and command to be executed $count = 0; foreach $_ (@commands) { push @thr_ids, Thread->new(\&run_single_command, $ssh_objs[$count], $_); $count++; } # join all the threads. $_->

Re: Installing threads module from CPAN

2009-02-19 Thread Vitthal Gogate
Just to update further, I found 64bit perl installed on my machine and when I used it, I did not have to do any Makefile changes to compile and install the threads-1.71 module... it all worked fine. On 2/19/09 3:06 PM, "Suhas Gogate" wrote: > Thanks zentara, I think use bli

Re: Installing threads module from CPAN

2009-02-19 Thread Vitthal Gogate
changes to the Makefile. The problem was, my OS is 64bit, perl installed at default system path is 32 bit but threads module (threads.so) I was compiling and installing locally was being linked to 64bit libraries. So I had to compile and link it in a 32bit mode. Added -m32 option on gcc for both comp

Installing threads module from CPAN

2009-02-18 Thread Vitthal Gogate
Hi folks, I am trying to install a threads module downloaded from CPAN ( threads-1.71.tar) in my home directory (~/data_mirror/ver2/pmodules). The version of the perl installed on my linux machine (at default path) does not have the latest. I want to use the method $thr->is_joinable() to see

threads and processes with redirected STDOUT and STDERR on win32

2008-08-25 Thread Alexandru Maximciuc
Hello beginners, any hints on this problem? win32... I have N threads. in each thread I want to run a command and redirect it's STDERR and STDOUT to a filehandle/socket opened in the main thread. I tried with IPC::Run3 but the outputs get scrambled. -- Best regards, Alex

Re: creating simaltaneous threads

2008-06-04 Thread Rob Dixon
perl pra wrote: > > I want to create 100 threads/processes simaltaneoulsy (at the same time), > and those 100 threads/processes should execute a subrountine at the same > time. > > can anybody help me giving some ideas reagarding this, I tried creating this > 100 proces

creating simaltaneous threads

2008-06-04 Thread perl pra
hi gurus, I want to create 100 threads/processes simaltaneoulsy (at the same time), and those 100 threads/processes should execute a subrountine at the same time. can anybody help me giving some ideas reagarding this, I tried creating this 100 process using fork in a for loop but that does

Re: creating multiple threads in perl

2008-05-28 Thread Rob Dixon
perl pra wrote: > > I need to create "n" mulitple threads simaltaneously and all the threads > should do same operation(just like Jmeter). > > > i have a subroutine > > sub printname{ > > my ($tid)[EMAIL PROTECTED]; > >

Re: creating multiple threads in perl

2008-05-28 Thread Chas. Owens
On Wed, May 28, 2008 at 7:53 AM, perl pra <[EMAIL PROTECTED]> wrote: > Hi gurus, > > I need to create "n" mulitple threads simaltaneously and all the threads > should do same operation(just like Jmeter). > > > i have a subroutine > > sub printnam

creating multiple threads in perl

2008-05-28 Thread perl pra
Hi gurus, I need to create "n" mulitple threads simaltaneously and all the threads should do same operation(just like Jmeter). i have a subroutine sub printname{ my ($tid)[EMAIL PROTECTED]; print "name is guru tid is $tid\n";

Threads/Queue Help

2007-12-16 Thread Nihilism Machine
time. here is what i have so far. #!/usr/local/bin/perl # Packages Needed use threads; use Thread::Queue; sub doThisLotsofTimes { # Do something here } for my $i (1 .. 500) { $stream->enqueue($i); } $stream->enqueue(undef); $kid = new threads(\&check_num, $

Re: Problems with threads and XML::RPC::Server

2007-10-20 Thread Jenda Krynicky
gt; My smallish test case is as follows (beware potential GMail > linebreaks..): > > #!/usr/bin/perl > > use strict; > use warnings; > > use threads; > > use RPC::XML; > use RPC::XML::Server; > > my $findserver = RPC::XML::Server->new(host => 

Problems with threads and XML::RPC::Server

2007-10-20 Thread Richard Hartmann
Hi all, for lack of a general list, I decided to send this to this list. I am not sure if it is not well outside the scope of this list, if so, I apologize. My smallish test case is as follows (beware potential GMail linebreaks..): #!/usr/bin/perl use strict; use warnings; use threads; use

Problems with threads and XML::RPC::Server

2007-10-19 Thread Richard Hartmann
Hi all, for lack of a general list, I decided to send this to this list. I am not sure if it is not well outside the scope of this list, if so, I apologize. My smallish test case is as follows (beware potential GMail linebreaks..): #!/usr/bin/perl use strict; use warnings; use threads; use

Re: HTTP Filtering and Threads...

2007-09-15 Thread Mumia W.
AIL PROTECTED] To: Dan <[EMAIL PROTECTED]>, beginners@perl.org Subject: Re: HTTP Filtering and Threads... In-Reply-To: <[EMAIL PROTECTED]> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <[EMAIL PROTECTED]>

Re: HTTP Filtering and Threads...

2007-09-14 Thread Somu
you can store all the data in an array first and then apply regex on all lines, if the response come in lines. Else, get all the data in a scalar and apply the regex. I think this may get you the silva my ($name,$type,$mname) =~ /name=(.*) type=(.*) value=(.*)/i; i'm not sure though how we may ca

HTTP Filtering and Threads...

2007-09-14 Thread Dan
tances of this code running in paralel. :) I had looked at http://perldoc.perl.org/threads.html, but it doesn't helped so much. I belive I should add the thread support in a fashion that it work directly with the foreach loop instruction and GetUserData(), right? However I want to take care to

Re: Memory leaks with threads

2007-07-09 Thread Michael Scondo
d a runaway of >> the memory consumption. >> After a few hundred connects and disconnects I'll get an Out of memory. :-( >> >> In order to test threads in perl, I wrote a new script which just spawns and >> terminates threads. ( Attached it below ) >> >

Memory leaks with threads

2007-07-05 Thread Michael Scondo
Hi, I'm still trying to get familiar with threads and sockets. However, I got in some troubles with memory leaks, could anyone perhaps give me a hint in which way I should write a multithreaded socket server ? I wrote a small server, which accepts connections on a tcp socket and spawns a

Re: share semaphore across threads

2007-02-14 Thread natevw
On 2007-02-13 14:35:40 -0800, [EMAIL PROTECTED] (Nathan Vander Wilt) said: I have a list of data that I want to operate concurrently on, as many threads as I have processors. So I wrote a bit of code that uses a semaphore to halt spawning of new threads when the limit are already running. I

  1   2   3   >