Threading in FPC on Win32 and Linux

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Threading in FPC on Win32 and Linux

Jason P Sage
Does anyone have any suggestions on where I should really start with making
threads etc in a manner that will allow one code base but work on at least
win32 and Linux?

I'm trying to make an application that is more or less acting like a daemon,
that waits for a message from another process, and takes that information
and begins processing it in a separate thread or process, allowing the main
app to be already in a state ready to catch another message when it arrives
and do the same thing.

In short, I'm trying to implement a "FAST-CGI" like (but not FASTCGI itself)
thin layer CGI client, that gets a request, and passes the required info to
a bigger application which actually does the work and then passes the
resultant out going web page result back to the thin layer CGI app that then
spits it out to the client.

Thanks in advance!
Jason P Sage


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Threading in FPC on Win32 and Linux

Felipe Monteiro de Carvalho
On 8/6/06, Jason P Sage <[hidden email]> wrote:
> Does anyone have any suggestions on where I should really start with making
> threads etc in a manner that will allow one code base but work on at least
> win32 and Linux?

There is a tutorial here:

http://wiki.lazarus.freepascal.org/index.php/Multithreaded_Application_Tutorial

And it should work on all supported platforms.

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Threading in FPC on Win32 and Linux

Jonas Maebe-2
In reply to this post by Jason P Sage

On 06 Aug 2006, at 11:30, Jason P Sage wrote:

> Does anyone have any suggestions on where I should really start  
> with making
> threads etc in a manner that will allow one code base but work on  
> at least
> win32 and Linux?

http://www.freepascal.org/docs-html/rtl/classes/tthread.html


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal