Originally asked here:
https://stackoverflow.com/questions/63537158/how-to-list-all-the-removable-devices-with-dbus-and-udisks2
I need to list, filter and open block devices with UDisks2. I am
trying to list all the removable devices.
The GetBlockDevices method provided by UDisks2 requires
I have a separate version for flatpak builds in my app. Let's say
I have a large project that builds with dub that goes like this:
import std.stdio;
void main()
{
version (flatpak) {
writeln(`Flatpak build`);
} else {
writeln("Edit source/app.d to
On Saturday, 27 June 2020 at 07:31:56 UTC, Kagamin wrote:
std.concurrency is for noninteractive appications, the approach
with gui timer was the correct one.
Thank you. That works but my progress bar is sometimes getting
stuck because of a possible data race.
See
https://forum.dlang.org/post/
I have a list of files to download, and I want to download them
in parallel. At the end of each of those parallel download I want
to send the main thread a message from the parallel loop.
import std.concurrency, std.parallelism;
string[] files = ["a", "b", "c"];
void download(string[] links)
On Sunday, 21 June 2020 at 12:43:32 UTC, adnan338 wrote:
On Sunday, 21 June 2020 at 09:16:06 UTC, Ali Çehreli wrote:
On 6/20/20 9:30 AM, adnan338 wrote:
> Hello, I need a code review on my strategy
I don't know gtkd so I did not compile the code and I did not
review the code very carefully.
On Sunday, 21 June 2020 at 09:16:06 UTC, Ali Çehreli wrote:
On 6/20/20 9:30 AM, adnan338 wrote:
> Hello, I need a code review on my strategy
I don't know gtkd so I did not compile the code and I did not
review the code very carefully.
However, I don't think you need to 'synchronized' the who
Hello, I need a code review on my strategy of updating a GtkD
progressbar. Gtk is not thread safe, I interpret that as "I must
only access data available in the main thread from the Gtk
objects".
This example is a simplified excerpt of my project. I have never
done concurrency before and thus
I have a list of files to download from the internet. Each of
those downloads are a time consuming task.
What I want to do is download them concurrently and when each of
those downloads finish, I want to activate something in my main
thread, which will update a progressbar in the GUI thread.
On Thursday, 11 June 2020 at 06:05:09 UTC, adnan338 wrote:
I would like to set a callback for the `download()` function
but I do not seem to find a way to add a callback to the
procedure.
[...]
I have also been told that Gtk is not thread safe. What does this
mean and does it effect me on t
I would like to set a callback for the `download()` function but
I do not seem to find a way to add a callback to the procedure.
Let's say, for example I have a GtkD Widget called "pb" (short
for progressBar).
I want to download a file from a url and when done, I want a
callback to access pb
On Monday, 8 June 2020 at 08:10:19 UTC, Simen Kjærås wrote:
On Monday, 8 June 2020 at 07:35:12 UTC, adnan338 wrote:
Self* searchTree(this Self)(auto in ref T item) const {
if (&this is null)
return null;
if (this.item == item)
return &this;
ret
Hi, as far as I understand, the `this` template parameter
includes constness qualifiers as seen in
https://ddili.org/ders/d.en/templates_more.html
To apply this I have this following struct:
module bst;
struct Tree(T) {
T item;
Tree!T* parent, left, right;
this(T item) {
12 matches
Mail list logo