Re: Threading with Socket Server

2011-03-24 Thread baloan
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

Threading with Socket Server

2011-03-23 Thread T
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

Re: Threading with Socket Server

2011-03-23 Thread Boris FELD
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

Re: Threading with Socket Server

2011-03-23 Thread T
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