How to manage the return value of a thread?

后端 未结 5 1728
逝去的感伤
逝去的感伤 2020-12-28 20:22

I created a class derived from TThread that executes in background a query.

I want that this class is decoupled from the client.

This kind of th

5条回答
  •  死守一世寂寞
    2020-12-28 21:28

    What version of Delphi are you using? If you're on D2009 or newer, you can pass an anonymous method to Synchronize that takes no parameters but references local variables, passing them "under the radar" as part of the closure.

提交回复
热议问题