pluto: Added a generic event queue.

This allows to easily execute arbitrary callbacks in the context of the pluto
main thread (e.g. in order to synchronize with threads from the thread-pool).
This commit is contained in:
Tobias Brunner
2010-09-02 19:04:21 +02:00
parent 4cf459a054
commit 8808edfb4c
6 changed files with 292 additions and 1 deletions
+2
View File
@@ -41,6 +41,7 @@ pluto_t *pluto;
void pluto_deinit()
{
private_pluto_t *this = (private_pluto_t*)pluto;
this->public.events->destroy(this->public.events);
this->public.xauth->destroy(this->public.xauth);
free(this);
pluto = NULL;
@@ -55,6 +56,7 @@ bool pluto_init(char *file)
INIT(this,
.public = {
.events = event_queue_create(),
.xauth = xauth_manager_create(),
},
);