TppTemplate.LoadFromStream
TppTemplate.LoadFromStream uses GlobalNameSpace.BeginWrite/EndWrite for "thred safety reading components". I'm familiar with GlobalNameSpace due to a deadlock scenario I encountered 15 years ago in Delphi 6.
I'm curious how safe it is to call TppTemplate.LoadFromStream from a thread other than the VCL thread. If I ensure that no code touches the TppReport and related objects (pipeline, data source, etc) until after LoadFromStream is finished, can a report template be loaded "in the background"?
FWIW, I'm currently using Delphi 11.3 and RB Enterprise Edition 22.03 Build 340.
Thanks
I'm curious how safe it is to call TppTemplate.LoadFromStream from a thread other than the VCL thread. If I ensure that no code touches the TppReport and related objects (pipeline, data source, etc) until after LoadFromStream is finished, can a report template be loaded "in the background"?
FWIW, I'm currently using Delphi 11.3 and RB Enterprise Edition 22.03 Build 340.
Thanks
Comments
We have not had any known issues with deadlocking and are confident in the thread safety of ReportBuilder.
I am curious about your ultimate goal. Are you attempting to load a template in a background thread, then run the report in the main thread? Obviously you would need to be sure the report is not accessed while the template is being loaded but that begs the question: why load in a thread to begin with?
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com