Have you ever needed to use methods with both thread-safe and not thread-safe calls, with conditions that skip over commands that are not thread-safe? Currently the compiler prevents doing this and an error is thrown, however there’s a flag that lets you disable this check and this blog post shows you how.
Preemptive processes are very useful for performing extensive calculations in parallel, using all of the cores in your CPU, but sometimes you need to delegate tasks to a cooperative process (e.g., using a non-preemptive command). With the New signal command, you can pause a process and wait for the response from another process!
Preemptive processes allow your applications to take full advantage of multi-core computers, resulting in faster responses to simultaneous requests. Beginning with 4D v17 R4, Begin SQL, End SQL, and the associated SQL statements used with an internal database are now preemptive compliant.
Do you need to run complex calculations or exports on the client side? Use preemptive processes and start these actions without slowing down users and their daily work!
4D lets you take full advantage of multi-core computers with preemptive processes. In a previous blog post, we’ve provided you with a list of enhanced commands that can be used in preemptive processes, enabling faster global execution time and more connected users. And in response to your feedback, we increased the list with even more commands.
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.
Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!
* Your privacy is very important to us. Please click here to view our Policy