0xAX
0xAX

Reputation: 21837

cancellable thread

In my C/gtk+ application i read some data with dk_pixbuf_new_from_stream, and i must do it cancellable with GCancellable: where can i find example of using GCancellable?

Thank you

Upvotes: 2

Views: 514

Answers (1)

unwind
unwind

Reputation: 399989

All you need to do is create the GCancellable and hand it to the thread, which then calls gdk_pixbuf_new_from_stream(). From your main thread, if you want to abort the loading, call g_cancellable_cancel() on the same GCancellable instance.

Upvotes: 2

Related Questions