Re: aysnc functions v. callback_data

On Thu, 2004-07-01 at 16:54, Murray Cumming wrote:
> It looks like the async function needs extra destroy_callbacks
> For instance,
> in gnome_vfs_async_open(), we would normally release the callback_data
> when the callback is called, because we assume that the callback will
> only be called once. But if someone calls gnome_vfs_async_cancel() then
> the callback_data will never be released, because the callback will
> never be called.
> So do we need new versions of these functions?

I don't know why they weren't added when the functions were created, i
assume people thought "well, if the user cancelled the job they might as
well free the callback data (if they want that) at the same time". That
does require a bit more bookkeeping on the side of the app though  (you
need the mapping from wherever you store the outstanding handle to the
callback data for that handle).

Adding it requires a lot of new functions though...

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a superhumanly strong flyboy librarian in drag. She's a scantily clad 
French-Canadian widow with her own daytime radio talk show. They fight crime! 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]