Add dc_event_emitter_close() API

dc_event_emitter_close() can be used to terminate
event loop from another thread without dereferencing the
context which may be in use by the event loop at the same time.
This commit is contained in:
link2xt
2022-05-03 18:14:22 +00:00
parent 95a54a43ff
commit eb3242e077
4 changed files with 31 additions and 2 deletions

View File

@@ -5201,6 +5201,15 @@ dc_event_t* dc_get_next_event(dc_event_emitter_t* emitter);
void dc_event_emitter_unref(dc_event_emitter_t* emitter);
/**
* Closes event emitter object.
*
* @memberof dc_event_emitter_t
* @param emitter Event emitter object as returned from dc_get_event_emitter().
*/
void dc_event_emitter_close(dc_event_emitter_t* emitter);
/**
* @class dc_accounts_event_emitter_t
*