Author: ArcRiley Date: 2009-02-26 17:56:08 -0500 (Thu, 26 Feb 2009) New Revision: 1529
Modified: trunk/concordance/include/concordance.h trunk/concordance/include/concordance.sockets.h trunk/concordance/src/_core/__init__.c trunk/concordance/src/sockets/Socket.c Log: creates callback queues Modified: trunk/concordance/include/concordance.h =================================================================== --- trunk/concordance/include/concordance.h 2009-02-26 22:56:02 UTC (rev 1528) +++ trunk/concordance/include/concordance.h 2009-02-26 22:56:08 UTC (rev 1529) @@ -46,6 +46,8 @@ GMainContext* context; /* Concordance's Glib context */ GMainLoop* mainloop; /* Concordance's Glib mainloop */ GThread* threadid; /* thread ID for mainloop thread */ + GAsyncQueue* queueRecv; /* callback queue input */ + GAsyncQueue* queueSend; /* callback queue output */ } concordGlobals; typedef struct { Modified: trunk/concordance/include/concordance.sockets.h =================================================================== --- trunk/concordance/include/concordance.sockets.h 2009-02-26 22:56:02 UTC (rev 1528) +++ trunk/concordance/include/concordance.sockets.h 2009-02-26 22:56:08 UTC (rev 1529) @@ -40,6 +40,8 @@ PyObject* module; /* reference to our own module */ GMainContext* context; /* Concordance's Glib context */ Gsasl* saslCntx; /* Concordance's SASL context */ + GAsyncQueue* queueRecv; /* callback queue input */ + GAsyncQueue* queueSend; /* callback queue output */ GHashTable* domains; /* domain->service lookup */ const gchar* addr; gushort port; @@ -54,6 +56,8 @@ PyObject* module; /* reference to our own module */ GMainContext* context; /* Concordance's Glib context */ Gsasl* saslCntx; /* Concordance's SASL context */ + GAsyncQueue* queueRecv; /* callback queue input */ + GAsyncQueue* queueSend; /* callback queue output */ GHashTable* domains; /* domain->service lookup */ const gchar* addr; gushort port; Modified: trunk/concordance/src/_core/__init__.c =================================================================== --- trunk/concordance/src/_core/__init__.c 2009-02-26 22:56:02 UTC (rev 1528) +++ trunk/concordance/src/_core/__init__.c 2009-02-26 22:56:08 UTC (rev 1529) @@ -111,6 +111,13 @@ */ globals->context = g_main_context_new(); + /* create callback queues + + GAsyncQueue* g_async_queue_new (void); + */ + globals->queueRecv = g_async_queue_new(); + globals->queueSend = g_async_queue_new(); + /* launch _core_loop thread GThread* g_thread_create (GThreadFunc func, Modified: trunk/concordance/src/sockets/Socket.c =================================================================== --- trunk/concordance/src/sockets/Socket.c 2009-02-26 22:56:02 UTC (rev 1528) +++ trunk/concordance/src/sockets/Socket.c 2009-02-26 22:56:08 UTC (rev 1529) @@ -285,6 +285,10 @@ self->context = ((concordGlobals*) PyModule_GetState(state->_core))->context; self->saslCntx = state->saslCntx; + self->queueRecv = ((concordGlobals*) + PyModule_GetState(state->_core))->queueRecv; + self->queueSend = ((concordGlobals*) + PyModule_GetState(state->_core))->queueSend; /* create new domains hashtable _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn