Background thread, async and GUI (dlangui)

Bagomot bagomot at gmail.com
Wed Jul 6 09:26:35 UTC 2022


Hello! I have a few questions about multithreading, asynchrony 
and how it works with the GUI.

1) How to make asynchronous HTTP requests with curl in order to 
receive progress and status? And how do you know that the request 
is completed? This question is related to the next one, so it 
should be answered in the context of working with the GUI.

2) How to get and update information in the GUI (I use dlangui) 
about the execution of an asynchronous http request (for example, 
downloading a file)? Something like a progress bar.

3) My application must perform some work in a separate thread (I 
do this through inheritance of the worker from 
core.thread.Thread, is that correct?). I need to be able to 
manage data in the GUI from this thread without blocking GUI. I 
found that you can use RunnableEvent for dlangui, but I can’t 
figure out how to do it (and I didn’t find any examples). Could 
you suggest how to do it?

Sorry if the questions here are a bit from different topics, but 
they are all related to dlangui.


More information about the Digitalmars-d-learn mailing list