You are not logged in.
Hi Arnaud,
In my standalone program, I'm creating running TSQLRestServerDB.ExportServerNamedPipe() in a separated thread, but just now I checked the source code of that function, it seems that ExportServerNamedPipe() will create another thread.
Does it mean I can simply run ExportServerNamedPipe() in my the main thread, and the server will automatically runs in a separated thread?
Couldn't find related info in the manual. Sorry.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
One more question, ab, ExportServerMessage() doesn't create its own thread, right?
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Offline
thanks for the info, Arnaud.
PS 1, it seems that a windows message-based server (ExportServerMessage()) doesn't work inside a TOmniWorker (of OTL - OmniThreadLibrary), I tried that, and when a client access that server from the main thread, the program will hang. Maybe it conflicts with OTL's message loops... Anyways, just a report to you, I use the named pipe protocol now.
PS 2, you seem to use the term 'GDI message', but a Google search didn't show any results about it, I guess the more proper term should be 'win32 message', or 'winapi message', or 'Windows message'? This occurred to me when replying you, so I figured I'd mention it
Last edited by edwinsn (2014-05-18 15:34:41)
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
PS 2 - it has been fixed two days ago (if I remember well), and changed the documentation into "Windows Message".
But I just checked the source, and there was still some occurrences.
See http://synopse.info/fossil/info/010f6771d7
It should be fixed now.
Thanks for the feedback.
Offline
Thanks, ab, one more question, if you don't mind.
If I define a server side function, eg, TSQLRestServerDB.Sum(), will this function runs in the thread created by ExportServerNamedPipe() ?
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
For a method-based services, it runs by default in the calling thread (i.e. the one used for Named Pipe communication).
But you can change it setting a value to TSQLRestServer.AcquireExecutionMode[execSOAByMethod] property (by default, this is amUnlocked).
For interface-based services, you have even more options.
All this is explained in the SAD 1.18 pdf.
Offline