I wrote a demo for GtkD showing how multi-threading and D work together, it's in the demos/gtkD/DemoMultithread folder of GtkD, hopefully it will be helpful. However this example it is based on using the GTk threadIdle callback which is generally preferred over the locking methods you show above, obviously though your use case may vary but keep in mind the locking methods have been deprecated, see the GTK 3 reference manual here:

https://developer.gnome.org/gdk3/stable/gdk3-Threads.html

You also see this GtkD issue here for https://github.com/gtkd-developers/GtkD/issues/137 for some code on how to use Delgates with gdk_threads_add_idle (i.e. GtkD gdk.Threads.threadsAddIdle).

Thanks for your example code. Do i need those extern (C) function? Why is it not possible to write the value to the TreeView in D?


Reply via email to