Re: Proposal of API change



On Wed, 2008-05-21 at 17:05 +0200, Sergio Villar Senin wrote:


> I suggest changing the API of the send queue replacing the current
> synchronous cancel API by its an async version The problem of the
> current one is that if you're adding a message using the async call then
> calling tny_send_queue_cancel will hang the application because the
> outbox folder will be locked by two different threads.

There's already a tny_send_queue_add_async, no?

http://tinymail.org/API/libtinymail-1.0/libtinymail-tny-send-queue.html#tny-send-queue-add-async

You want a tny_send_queue_cancel_async? I think you can just make that
implicit (no need to add the _async). Or do you want to know when the
cancel ended? (sounds unlikely that you need this).

So rather than an API change, just make the cancel asynchronous? Note
that this implies that a cancel happens less early. Sounds a bit strange
to me ... to want to cancel asynchronously.


-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be






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