You are not logged in.
Pages: 1
Hi,
I modified the sample project 31 (LongWorkServer and LongWorkClient) to change the callback procedures into functions (WorkFinished and WorkFailed).
I added Sleep(5000) into these functions to simulate a long work into the callback functions.
I have this error message :
"TInterfacedObjectFakeServer.FakeCall(ILongWorkCallback.WorkFinished) failed: 'TWebSocketServerRest.Callback(1) received status=404 from root/LongWorkCallback.WorkFinished/1''
How could I set the timeout ?
Thx
Offline
It doesn't make any sense to have such a blocking process, even on the callback.
Callbacks were implemented first to avoid blocking processes from the main service calls, and make it asynchronous.
So synchronous/blocking process in the callback is a design error.
The callback is blocking, and should respond quick - even for a function.
This is a requirement, well documented IIRC.
It has also the risk of making a race condition in your implementation, from the mutex/CriticalSections you will use to protect shared objects.
Use asynch process - see https://synopse.info/files/html/Synopse … l#TITL_196 - and just return the execution state from the main REST methods, from client to server.
Offline
Thank you for your quick answer.
Offline
Pages: 1