Tech Tip: Compiler errors and Thread safety
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: July 16, 2025
When calling a component method in a 4D project , you may encounter a compiler error about calling a non-thread-safe method. This issue often arises when shared methods are not properly configured for thread safety, particularly in environments that support preemptive processes. Without the correct settings, the compiler may fail, disrupting development workflows.
To resolve compiler errors when calling component methods, configure all relevant methods in the component to be thread-safe by setting their execution mode to "Can be run in preemptive processes," as shared methods are marked thread-unsafe by default if set to "Indifferent." After updating the method properties, recompile the component to apply the changes.