In Delphi, is TDataSet thread safe?

前端 未结 6 1372
没有蜡笔的小新
没有蜡笔的小新 2021-01-02 02:30

I\'d like to be able to open a TDataSet asynchronously in its own thread so that the main VCL thread can continue until that\'s done, and then have the main VCL thread read

6条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-02 02:53

    One thing to keep in mind about using the same TDataSet between multiple threads is you can only read the current record at any given time. So if you are reading the record in one thread and then the other thread calls Next then you are in trouble.

提交回复
热议问题