Re: libpq/async notifications
От | Tom Lane |
---|---|
Тема | Re: libpq/async notifications |
Дата | |
Msg-id | 10861.1066151909@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: libpq/async notifications (Igor Shevchenko <igor@carcass.ath.cx>) |
Список | pgsql-interfaces |
Igor Shevchenko <igor@carcass.ath.cx> writes: > The idea behind this checking function is to separate the *checking* if > there's any notifications and actually *processing* them. I want to check > right after any transaction or any PQ* function which calls PQconsumeInput > and process notifications only once, after my app had returned to it's main > loop (I'm talking about GUI apps here). In Qt, for example, this is done by > creating a new QEvent and dispatching it via QApplication::postEvent(...), > which is quite an overhead; with just PQnotifies I have to do this all the > time. How so? Seems to me the check operation could read notify = PQnotifies(...);if (notify){ make QEvent, put notify pointer in it, dispatch} The event handler then fetches the notify pointer from the QEvent (and eventually frees it). regards, tom lane
В списке pgsql-interfaces по дате отправления: