开发者

cancellable thread

开发者 https://www.devze.com 2023-01-02 19:07 出处:网络
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 fi开发者_C百科nd example of using GCancellable?

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 fi开发者_C百科nd example of using GCancellable?

Thank you


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号