[Lazarus] lNet and several threads

Aleš Katona almindor at gmail.com
Sat Apr 18 09:08:52 CEST 2009


On Thu, 16 Apr 2009 20:01:57 +0200
User <usuarioanonimomysql at gmail.com> wrote:

> How I can use several threads with lNet visual library?
> 
> I need some examples.
> 
> Best regards!

Hello. lNet is inheritedly not thread-safe but it can be used with threads in some ways. When it comes to the visual components, you must remember that the main program loop (handled by the widgetsets) calls the lNet callbacks (OnReceive etc.) so they are all executed inside the main thread no matter where you work with the components otherwise.

I'd need some specific use case to give more info.

Ales



More information about the Lazarus mailing list