Re: Long running DBI queries (gtk2 , threads)
- From: "A. Pagaltzis" <pagaltzis gmx de>
- To: GTK2-Perl List <gtk-perl-list gnome org>
- Subject: Re: Long running DBI queries (gtk2 , threads)
- Date: Fri, 2 Sep 2005 18:13:01 +0200
* ofey aikon <ofey aikon gmail com> [2005-09-02 18:00]:
On 9/1/05, A. Pagaltzis <pagaltzis gmx de> wrote:
This seems like bad API design. Instead of requiring the
programmer to make up a name to refer to the information,
return an object from the register call that encapsulates all
the necessary information.
my $threaded_query = $mythread->register_sql( \&call_sql, \&call_back );
$threaded_query->execute( @some_params );
That looks better. Thanks !
Incidentally, thereâs some other module that uses the same model.
I think itâs called DBI or something like that, if memory serves.
:-)
Regards,
--
#Aristotle
*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]