Since both threads will be accessing the same database, would I need to
connect and then close the database handle every time I query it or can
the handle be left open? add as far as accessing the database, I

Most databases can handle concurrent connections, so you should be able to leave each handle open.

An alternative design methodology - is to use a single thread handling database access, with the Net::IRC thread and the GUI sending "requests" to the database thread (via thread queues). This approach has several advantages (such as responsiveness as your Net::IRC and GUI thread don't block on database access) but the downside is the extra work involved

Cheers,

jez.



Reply via email to