develooper Front page | perl.ithreads | Postings from April 2008

Re: Perl threads under Windows

Thread Previous | Thread Next
From:
Octavian Rasnita
Date:
April 19, 2008 14:08
Subject:
Re: Perl threads under Windows
Message ID:
00c601c8a261$6b9910e0$c2a2b451@teddy
I read on many places that the database handles can't be shared successfully 
and I also guess the GUI windows objects can't be shared, but I heard that 
this is possible under other languages and that's why I wanted to know if it 
would be possible to create a multithreading program in perl as easy as in 
other languages like C# or Java.

I prefer to not need to send messages to windows, and act in each window 
based on those messages, because it would be too low-level programming and I 
would need to learn too many things about the GUIs I use, and some of them 
don't have a very good documentation and it would be pretty hard.

Basicly what I intend to do is to create a client-server application where 
the client is made using WxPerl and where the client should have some worker 
threads that download some XML files from the internet, some css files from 
other web sites on a user-defined schedule, store them in a local database 
made with SQLite or something else, communicate with the server part of the 
application by request or based on a schedule defined by the user, and 
display the data in more windows. The client should not block if it 
downloads something from a certain source, or when the user sends something 
to the server.

Even if I won't use a shared database handle, this wouldn't be very hard, 
because I could create separate database connections for each thread, but 
the problem is that I would still need to access the WxPerl windows from the 
worker threads.

Passing messages to a window might not seem very complicated, but if there 
are more windows, and many rules based on admin's preferences, on user's 
schedule, or by user's request, might make the program a spaghetti 
application. I think what I want to do should be a very common client-server 
application. Do you know if I could find somewhere such sample apps made in 
perl?

Thank you.







Octavian

----- Original Message ----- 
From: "Christopher Fowler" <cfowler@outpostsentinel.com>
To: "Dean Arnold" <darnold@presicient.com>
Cc: "Octavian Rasnita" <orasnita@gmail.com>; <perl-ithreads@perl.org>
Sent: Saturday, April 19, 2008 10:30 PM
Subject: Re: Perl threads under Windows


>
> Correct about DBI.  I've even ran into problems doing forks with db
> handles.
>
>
> 


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About