Is it safe to modify VirtualTreeView data from a secondary stream? And if so, should critical sections be used (or even the Synchronize method)?
I am afraid that when I write a record of VT data from another stream, the main stream causes it to be redrawn, and this update will cause the reading of the same record at a time. I would add that I use only 2 threads in the application.
Sort of...
type PSomeRecord = ^TSomeRecord; TSomeRecord = record SomeString: string; SomeInteger: integer; SomeBoolean: boolean; end; ... var FCriticalSection: TRTLCriticalSection;
Update
I have added critical sections to the code, is it really not safe to call GetNodeData from the TMyCreatedThread class, even if this function returns only a pointer to a record?
thanks a lot
Hello
user532231
source share