Threading with Socket Server

T misceverything at gmail.com
Wed Mar 23 11:27:05 EDT 2011


The server portion of the program will typically be writing to the
shelve file (there may be a few cases in which I will need it to
read), and the other part of the program will read it.  Basically, I
want the following to be able to both go on at the same time:  1)
Server portion waits for connections, and upon connection writes data
received to shelve file   and   2) Continuously polls shelve file
every x seconds and checks for new entries.  I had given thought to
the potential of a race condition as you mentioned, but am not sure of
how to "safely" allow each portion of the program to read/write.



More information about the Python-list mailing list