Re: Long running DBI queries (gtk2 , threads)

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 !

On 9/1/05, muppet <scott asofyet org> wrote:
Lowercase package names are typically reserved for pragmatic
modules.  Please call it Gtk2::Ex::Threads::DBI.

That was my original intention. Then I encountered this whole
discussion of (old) vs (ithreads). And since I
was using ithreads, I went for the lowercase name. I still like the
upper case name and so I'll revert to calling it

Would it be a little simpler to have Gtk2::Ex::DBI, and have that
implemented with threads on win32 and whatever works best on linux
(with the implemention completely hidden, of course)?

I think this approach will work on linux too. I'll be testing it on
linux to see how it goes.

On 9/1/05, Daniel Kasak <dkasak nusconsulting com au> wrote:
Gtk2::Ex::DBI is mine, and I will defend it if necessary :)

I'll respect your territory :) Since you are using Gtk2::Ex::DBI for
writing lot of high level widgets, I don't want to intrude into that
namespace with this infrastructural code.

Also, I think this approach can be extended to other jobs like (long
file read, read from socket or whatever). So I emphasize on 'Threads'
first and 'DBI' only later. May be later on we'll have
Gtk2::Ex::Threads::* modules.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]