If you don't mind to use the coroutine library eventlet you can
implement a single threaded solution. See example below. For your use
case you need to change controller to load the shelve every
eventlet.sleep(n) seconds.
Regards, Andreas
# eventlet single thread demo
prc_publish.eventlet
Hello all, I am writing a Windows service that needs to 1) Act as a
server (TCP), and write to a shelve file, and 2) Read that same shelve
file every x number of seconds. My thought is to create 2 separate
classes (1 for the socket server and writing to the shelve file, and
another to read the
I'm not sure to understand what you want. Is it your server process
that will read the shelve file ? You may give more informations about
your problem, but i can give you some hints.
In order to create a TCP server, you can use SocketServer which is in
the builtin library
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