Subject Re: Hanging by a Thread
Author inoffensive_2006
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 03:22 PM 29/09/2007, you wrote:
>
> > From that discussion, I've added "localhost:"
> >to the front of the database name, the first time
> >I tried that it worked, but latter attempts still
> >freeze.
> >
> > Any ideas, or suggestions on what I should try?
>
> I'm sorry to say that your theory of having a thread busy activating
> all your data access stuff for the main thread while the main thread
> tickles the baby grand aint gonna work. You can't run multiple data
> access threads over a single connection and, sadly, one connection
> can't fiddle about with another connection's stuff. A data access
> thread needs a connection with all its own bits and bobs
> (transactions, statements, etc.) that is cleaned up and released when
> the thread has finished with it. You'll be able to have a connection
> with its own bits and bobs in the main thread, of course, but it
> can't be shared with other threads, either, and it can't use stuff
> that was retrieved by another thread.

Thanks Helen and Adam:

And thanks Helen for a great book.

What do you mean "it can't use stuff that was retrieved
by another thread."?

That's my stuff, isn't it? After one thread fetches
data from the select, can't the other thread use it?

I was planning for the thread to read everything required
for a login, and post a message informing the main thread that
can proceed with the login. The thread can then begin the slow
process of building the nodes in shared memory from the large
contact table.

Does this sound like it will work?

> Stick with TCP/IP if you intend to deploy this software for use on a
> LAN or you intend compiling it as an ISAPI library. The system is
> designed for network access. Use an alias for the database path. The
> local loopback server (localhost, IP address 127.0.0.1) is OK when
> the user app and the database server are on and older Win32 on the
> same box (albeit the game changes if the user is a local RDT
> client). Don't hard-code the hostname: make provision for the user
> to input the name of the server host (or select it, or read it from
> an INI or the Registry) .

I appreciate that advice. I just hard coded "localhost:" for
testing.

What's "RDT"?


Thanks
Larry