Preemptive Web Services allow your applications to take full advantage of multi-core computers resulting in faster responses for simultaneous requests. It’s not only powerful, it’s also easy: from the Method Properties of any method, just select the “Can be run in preemptive processes” option and you’re off and running!
A 4D method can be preemptive or not according to compilation options and the use of the language, as explained in this post.
By default, when the Web Services Server receives multiple requests, it uses cooperative threads to process them, i.e., all processes running on a single core. Now if you allow your methods to be used in preemptive threads, 4D uses all of the available cores to run several jobs in parallel.
For example, the video below demonstrates a reduction of response time divided by 3:
As you can see, preemptive mode increases the speed of your requests because the power of all of the processors is engaged.
New Thread safe commands
All the commands of the Web Service are now thread-safe.
Server commands:
Client commands: