attempt at uncancelling a cancelled operation.
2004-03-03 Not Zed <NotZed@Ximian.com> * camel-operation.c (camel_operation_uncancel): attempt at uncancelling a cancelled operation. svn path=/trunk/; revision=24947
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
2004-03-03 Not Zed <NotZed@Ximian.com>
|
||||
|
||||
* camel-operation.c (camel_operation_uncancel): attempt at
|
||||
uncancelling a cancelled operation.
|
||||
|
||||
* camel-stream-filter.c (do_write, do_write): fun dun diddley un
|
||||
fun. Since we're writing a const buffer, we need to copy it
|
||||
first. See #54937.
|
||||
|
||||
@ -305,6 +305,30 @@ camel_operation_cancel (CamelOperation *cc)
|
||||
UNLOCK();
|
||||
}
|
||||
|
||||
/**
|
||||
* camel_operation_uncancel:
|
||||
* @cc: operation context
|
||||
*
|
||||
* Uncancel a cancelled operation. If @cc is NULL then the current
|
||||
* operation is uncancelled.
|
||||
*
|
||||
* This is useful, if e.g. you need to do some cleaning up where a
|
||||
* cancellation lying around in the same thread will abort any
|
||||
* processing.
|
||||
**/
|
||||
void
|
||||
camel_operation_uncancel(CamelOperation *cc)
|
||||
{
|
||||
if (cc == NULL)
|
||||
cc = (CamelOperation *)pthread_getspecific(operation_key);
|
||||
|
||||
if (cc) {
|
||||
LOCK();
|
||||
cc->flags &= ~CAMEL_OPERATION_CANCELLED;
|
||||
UNLOCK();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* camel_operation_register:
|
||||
* @cc: operation context
|
||||
|
||||
@ -46,6 +46,7 @@ void camel_operation_mute(CamelOperation *cc);
|
||||
void camel_operation_ref(CamelOperation *cc);
|
||||
void camel_operation_unref(CamelOperation *cc);
|
||||
void camel_operation_cancel(CamelOperation *cc);
|
||||
void camel_operation_uncancel(CamelOperation *cc);
|
||||
/* subthread functions */
|
||||
CamelOperation *camel_operation_register(CamelOperation *cc);
|
||||
void camel_operation_unregister (CamelOperation *cc);
|
||||
|
||||
Reference in New Issue
Block a user