Luca Olivetti via lazarus <[email protected]> schrieb am Do., 4. Juni 2020, 15:51:
> El 4/6/20 a les 15:37, Michael Van Canneyt via lazarus ha escrit: > > > > > > On Thu, 4 Jun 2020, Luca Olivetti via lazarus wrote: > > > >>> FServer.Port:=8080; > >>> FServer.Threaded:=true; > >>> FServer.Run; > >>> except > >>> on E:Exception do > >>> begin > >>> writeln(E.Message); > >>> sleep(1000); > >>> FServer.Free; > >>> end; > >>> end; > >> > >> Oh, and I had to do some more overriding so that the response could > >> have a reference to the calling thread (needed if I want to use > >> synchronize). > > > > That seems a bit strange, since you can do synchronize without needing > > access to the thread object using a class method of TThread ? > > TThread.Synchronize needs a TThread as the first parameter. > This is my work in progress > The thread parameter can be Nil. TThread will then use the CurrentThread threadvar and failing that it can also work without any thread object. In fact it is safer not to pass a thread. Regards, Sven >
-- _______________________________________________ lazarus mailing list [email protected] https://lists.lazarus-ide.org/listinfo/lazarus
