[fpc-pascal] Odyssey: SSockets and Threads.

Michael Schnell mschnell at lumino.de
Thu Apr 25 09:31:18 CEST 2013

On 04/24/2013 10:09 PM, silvioprog wrote:
> There are a multi-thread example using SSockets in FPC?

It should be no problem at all to use sockets in Threads (native or via 
lnet or Synapse.

Of course if using threads, you will see the problem of inter-thread 
communication and/or tread-to-mainthread signaling.

For the later (more likely to be necessary) you can easily use 
TThread.Synchronize(), TThread.Queue() and QueueAsyncCall().

These will work out of the box with the WidgetTypes "Windows" and "KDE", 
and supposedly "GTK" and some Mac-flavors, but not with some of the others.


More information about the fpc-pascal mailing list