DelphiVCL4Python icon indicating copy to clipboard operation
DelphiVCL4Python copied to clipboard

Call the main thread in the child thread to update the ui

Open xusuyuan0923 opened this issue 1 year ago • 6 comments

Hello, can you tell me how to call the main thread in the sub thread to update the UI?

xusuyuan0923 avatar Aug 02 '24 20:08 xusuyuan0923

Need to asynchronously call the main thread in the sub thread

xusuyuan0923 avatar Aug 02 '24 20:08 xusuyuan0923

Please, provide a project sample so I can support you.

lmbelo avatar Aug 02 '24 20:08 lmbelo

请提供一个项目样本,以便我为您提供支持。

17226626107823 I want to add content to the memo control in the subthread

xusuyuan0923 avatar Aug 03 '24 05:08 xusuyuan0923

请提供一个项目样本,以便我为您提供支持。

I asked in GPT and it said there was TThread, but after trying it out, it didn't

xusuyuan0923 avatar Aug 03 '24 16:08 xusuyuan0923

You can use a queue.Queue instance. In your thread you can queue some data and also put an event in the main thread to check the queue periodically.

I will work on a sample.

lmbelo avatar Aug 21 '24 00:08 lmbelo

Python 3.14 has removed the GIL lock. Can the DelphiVCL4Python and Python4Delphi libraries support native multi-threaded calls?

pengfan806 avatar Oct 11 '25 07:10 pengfan806