Threading to prevent GUI Freeze
TheDGuy via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jan 4 10:04:34 PST 2016
On Monday, 4 January 2016 at 17:33:28 UTC, Gerald wrote:
> On Monday, 4 January 2016 at 16:13:50 UTC, TheDGuy wrote:
>> [...]
>
> Yes, you need it. The extern (C) function is what GDK invokes
> on idle. In any GUI application there is a lot of idle time
> waiting for events, what the addThreadIdle allows you to do is
> take advantage of this and tell GTK that whenever it's sitting
> around doing nothing, give this function a call.
>
> [...]
Okay, thanks alot for your help. I think i will need some time to
understand this but one last question:
Do the errors come from the fact at i didn't use those GTK thread
mechanisms or that my function is not "spawnable"?
"std.concurrency.spawn(F, T...)(F fn, T args)
if(isSpawnable!(F,T))"
"Error: template std.concurrency.spawn cannot deduce function
from argument types!()(void delegate(Context cr, Widget widget),
Scoped Widget), candidates are:"
More information about the Digitalmars-d-learn
mailing list