Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xusuyuan0923 opened this issue Aug 2, 2024 · 5 comments
Open

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

xusuyuan0923 opened this issue Aug 2, 2024 · 5 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@xusuyuan0923
Copy link

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

@xusuyuan0923
Copy link
Author

Need to asynchronously call the main thread in the sub thread

@lmbelo lmbelo self-assigned this Aug 2, 2024
@lmbelo lmbelo added the help wanted Extra attention is needed label Aug 2, 2024
@lmbelo
Copy link
Member

lmbelo commented Aug 2, 2024

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

@xusuyuan0923
Copy link
Author

xusuyuan0923 commented Aug 3, 2024

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

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

@xusuyuan0923 xusuyuan0923 reopened this Aug 3, 2024
@xusuyuan0923
Copy link
Author

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

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

@lmbelo
Copy link
Member

lmbelo commented Aug 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants