You are not logged in.
Pages: 1
Hi Arnaud,
Can the object CRUD operation be asynchronous?
My application is a standalone program, some threads will download something from the Internet and let the ORM server (using the named pipes protocol) to save the data.
And I don't want those 'downloader threads' to wait for the ORM server to finish saving data, but just post the job to the ORM and forget.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
There is no such function yet.
You have to create your own thread for any asynchronous process.
You can use a library for that - like http://otl.17slon.com/
Offline
@ab,
I think I just got my answer by a reply of yours in another topic, by setting the following:
TSQLRestServerDB.AcquireExecutionMode[execORMWrite] := amBackgroundThread
And all the writing to the sqlite3 db will be run in another single, dedicated background, thread, right?
Last edited by edwinsn (2014-05-20 03:50:56)
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Oops, looks I myself is a little confused with my own question - with TSQLRestServerDB.AcquireExecutionMode[execORMWrite] := amBackgroundThread, the client still have to wait for the result of that background thread...
I already know the OTL threading library, but I want to make my program ready for inter-machine/process client/server architecture. I still need some thoughts...
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Well, looks I can use threads on the client side too...
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
On the client side, there is some background process built-in.
See http://blog.synopse.info/post/2013/07/0 … responsive
Offline
thanks for the info, that approach is not suitable for my case, I'll use threads on the client side.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Be aware that, in your case, I suppose each client thread should have its own TSQLRestClientURI instance, otherwise any shared instance will be blocking, so you will not benefit of multi-threading.
Offline
Be aware that, in your case, I suppose each client thread should have its own TSQLRestClientURI instance, otherwise any shared instance will be blocking, so you will not benefit of multi-threading.
Sure, and thanks!
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Pages: 1