I am thinking about the threading model for SHTTPD callbacks.
Which allows to block in the callback.
Currently, it is a state machine. Callback is provided with an input
and output buffers, and must check for overflows, etc, and keep state
if it outputs lots of data (e.g. is called more than once for single
request)
This state machine is quite hard to program. Threading way is much
simpler, although might not be that efficient. But performance is a non-goal
for shttpd. Simplicity is.
This is why I am poking about threading support. The idea is to spawn
a thread for a callback, and execute callback in that thread. Thus callback
may be written in synchronous way, may block etc.
Another way to do it is with coroutines, but this is hacky in C.
On 19/11/2007, Joel Sherrill <[EMAIL PROTECTED]> wrote:
>
> Sergey Lyubka wrote:
> > The logo is put on shttpd.sourceforge.net <http://shttpd.sourceforge.net
> >
> >
> > A question for you, RTEMS guys.
> > Does RTEMS have thread support, or lower level threading
> > primitives, like contexts?
> RTEMS threading via POSIX threads or what
> we refer to as the Classic API. But are you
> referring to some specific shttpd feature?
>
> --joel
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
shttpd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shttpd-general