request handling in a thread

Hilary Oliver <[email protected]>
Newsgroups gmane.comp.python.pyro
Message-ID <CAOBnPpL0EzZBEDKZ7ZyA9qzLAWrk02zbo7B-nRwh5+TayyD1Ew@mail.gmail.com>
Hi,

My application (Pyro3 as we still use connection authentication, as per my
post to this list a few months ago) currently looks like this (with
hundreds of details omitted):

while True:
    process_many_pyro_connected_objects() # part 1
    pyro_daemon.handleRequests( timeout=1 )  # part 2


The trouble is that when the number of pyro-connected objects gets large it
takes some time to process them (in part 1) and as a result responsiveness
to user requests goes down.  Sorry if this is a stupid question - I'm new
to threading - but as far as Pyro is concerned is it ok to do continuous
request handling in a separate thread, like this:

# thread 1
while True:
      process_many_pyro_connected_objects()

# thread 2
while True:
     pyro_daemon.handleRequests()

(so long as both threads only change the state of my pyro-connected objects
in a thread-safe way).  It seems to work, and I assume it is ok, but
thought maybe I should check with the experts.  Or is there a better way to
do it?

Thanks,
Hilary Oliver

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d

_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.