These patches add a Dispatcher (dispatcher.[ch]) struct that is used to reimplement main_dispatcher.[ch] and red_dispatcher.[ch] + red_worker.c
The first two patches I consider non RFC, the RFC is for the last patch: it adds 500 lines of code. it doesn't hide the underlying socket completely since the red_worker thread sends three non ack items (the two RedChannel instances and a READY reply right after thread creation) which I didn't incorporate into the Dispatcher. The bulk of the third patch was done automatically with some vim scripts, extracting the dispatcher_register calls and the RedWorkerMessage* structs, so I trust they don't have any typos. Tested with Windows 7 (async drivers) and Fedora 16 (sync drivers). Please review, Alon Levy (3): server/red_dispatcher: support concurrent asyncs server: introduce dispatcher server/red_worker: reuse dispatcher server/Makefile.am | 2 + server/dispatcher.c | 162 +++++++++++ server/dispatcher.h | 78 +++++ server/main_dispatcher.c | 105 ++------ server/red_dispatcher.c | 683 ++++++++++++++++++++++++++++++-------------- server/red_dispatcher.h | 185 ++++++++++++- server/red_worker.c | 716 +++++++++++++++++++++++++--------------------- server/red_worker.h | 2 + 8 files changed, 1304 insertions(+), 629 deletions(-) create mode 100644 server/dispatcher.c create mode 100644 server/dispatcher.h -- 1.7.7 _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel