Non-blocking Printing

With 4D v20 R4, we significantly improved the management of print jobs inside 4D. 4D can now run multiple print jobs in parallel, significantly increasing your applications’ reactivity while facilitating the management of concurrent print jobs.

Let me tell you more about it!

Before v20 R4, the 4D printing queue was blocking: When a print job was running, other attempts at printing were either refused or blocked as long as the current job was not finished. 

The famous “Printing” dialog tells you to wait for the current print job to finish.

With v20 R4 and the addition of non-blocking printing, 4D will run all the print jobs simultaneously. First, it will increase the performance when multiple jobs are running. But more importantly, long print jobs will no longer block faster print jobs: If you need to print all your records or have a complex print job, other processes can print in parallel, allowing you to keep working without limits. The third great asset of this change is that printing options will be handled per process, avoiding undesired interactions when multiple processes modify them.

Non-blocking printing is activated by default on all projects created from v20 R4 onwards. For older applications, you need to activate it in the compatibility options of the structure settings.

blank

The “Non-blocking printing” option of the Compatibility tab

Once activated, you can print as you’re used to. Still, there’s one change you need to take into account: Print options are no longer common to all processes. So, if a process modifies them through SET PRINT OPTIONS, PRINT SETTINGS, or BLOB to print options, it will no longer modify all the print options across your application. This will ease the management of print options between processes, but if you are used to the old functioning, you may have to review some parts of your code.

I hope this feature will help you manage printing in your applications. If you have remarks or questions, don’t hesitate to ask them at the forum. We will be more than happy to help you!

Nicolas Brachfogel
• Product Owner & Senior Developer • Nicolas Brachfogel joined 4D in 2017 as a Senior Developer (4D Server and networking). As Product Owner to manage the release of Apple Silicon, he's in charge of writing user stories and translating them into functional specifications, as well as making sure that feature implementations meet customer needs. A graduate of the Institut Supérieur d'Informatique Appliquée (INSIA), Nicolas began his career as a software developer in 2001. Following several years coding in Java and C++, he went on to specialize in client-server development for video game companies. As a server developer/architect, he successfully worked on the server architectures of many games (Dofus Arena, Drakerz, Trivial Pursuit Go!).