Re: Proposal of API change



Philip Van Hoof escribiu:
> 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?

I know, I said "adding a message using the async call"

> 
> 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).

Exactly, what I'd want is to use internally the get_headers_async or the
sync_async calls instead of the synchronous ones.

> 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.

I don't really want to make it async, but to implement it using async
calls in order not to get those hangs. The problem is that the error
parameter makes no sense in those cases, that's why it needs an API change.

Br



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