Hi, William

>
>How is this different from GNU Pthreads?
>

Are you talking about http://www.gnu.org/software/pth/pth-manual.html ?
As i know, Pth is another implementation of POSIX threads.

SPServer is a server framework, it implements:
1.An Accepter for TCP Server
2.An asynchronous layer. It has only one thread ( event loop thread ), 
  which is shared amongst all TCP connections. The event loop thread
  takes the responsibility to reading or writing data with TCP connections.
  In this layer, SPServer use libevent in order to utilize the best I/O 
  loop on any platform.
3.A synchronous layer. It has multiple threads. 
  Each activity/service can have its own thread of control.
  Long duration activities can run concurrently in their own threads
  without to worry about blocking other activities.
4.A queue between asynchronous layer and synchronous layer.
  The asynchronous layer reads data from TCP connections,
  and then puts the data and related handler to queue.
  The synchronous layer gets the data and related handler
  from the queue, and then wakes a thread to run the handler.

The Acceptor/Asynchronous Layer/Queue are total implemented by 
SPServer framework. Using SPServer, programers only need to implement
a subclass of SP_Handler and a subclass of SP_HandlerFactory.
The subclass of SP_Handler will run in a independent thread,
not in event loop thread. So programers can use synchronous programming
style to implement the subclass of SP_Handler. 

Best regards,
stephen



_______________________________________________
Libevent-users mailing list
[email protected]
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to