Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
With idle (not the editor :)) , it works perfect. Thanks for your help.

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
I'll try your example. Thanks.

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
I did not used glib.idle. Probably this is essential.

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
No use geany. The error occurs also when no editor is open. I think the gtk libraries are not meant to be used in multithreaded way, where gtk is not knowing what is happening. A process in background doing file things is no problem. It is when a process in background tries to update a lot of

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Thursday, 8 October 2020 at 19:57:12 UTC, Alaindevos wrote: The idea looked good but gtk was unhave when 1000 labels where updated by another thread. Are you using Idle? If yes, and still having issues? Sorry, I cannot help further.

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Thursday, 8 October 2020 at 19:53:26 UTC, Alaindevos wrote: I created blindly a thread and this allowed to do stuff in background. But when i passed the mainwindow as argument and did some stuff it resulted in, [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
The idea looked good but gtk was unhave when 1000 labels where updated by another thread.

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
I created blindly a thread and this allowed to do stuff in background. But when i passed the mainwindow as argument and did some stuff it resulted in, [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Kagamin via Digitalmars-d-learn
See https://forum.dlang.org/post/kqvpjwbkpravywald...@forum.dlang.org

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Thursday, 8 October 2020 at 17:02:55 UTC, Alaindevos wrote: One thing I want to do is in an eventhandler of a button released event which takes minutes in duration to change the state of the statusbar indicating something is going on. But the statusbar is not redrawn before the evenhandler

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
One thing I want to do is in an eventhandler of a button released event which takes minutes in duration to change the state of the statusbar indicating something is going on. But the statusbar is not redrawn before the evenhandler finishes. Better would be to start a new thread but

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Thursday, 8 October 2020 at 15:59:15 UTC, Alaindevos wrote: Because when the eventhandler takes to much time the application is no longer responsive. And even a simple redraw request is not performed before ending of the thread. A small and short demo app would nice. Or guideline and