Re: [Interest] QAbstractEventDispatcher - registerSocketNotifier(), unregisterSocketNotifier()

2020-02-04 Thread Thiago Macieira
On Monday, 3 February 2020 12:37:59 PST Narolewski Jakub wrote: > For the love of God I can't find it. Do I understand correctly, that I > should look for another place that call register / unregister > SocketNotifier() directly? No, look at QAbstractSocketEngineReceiver. But a quick look at the

Re: [Interest] QAbstractEventDispatcher - registerSocketNotifier(), unregisterSocketNotifier()

2020-02-03 Thread Narolewski Jakub
Just fixing small typo in my last email. "Typically there are around 108 clients per server instance" pon., 3 lut 2020 o 21:37 Narolewski Jakub napisał(a): > Hello :] > > I had some time to do more tests experimenting with custom event > dispatchers. > To give more background, my use case is as

Re: [Interest] QAbstractEventDispatcher - registerSocketNotifier(), unregisterSocketNotifier()

2020-02-03 Thread Narolewski Jakub
Hello :] I had some time to do more tests experimenting with custom event dispatchers. To give more background, my use case is as follows: 1. There is one main thread - 'Server' - that currently contains QWebSocketServer instance serving data to clients 2. There is one or more threads doing some

Re: [Interest] QAbstractEventDispatcher - registerSocketNotifier(), unregisterSocketNotifier()

2020-01-19 Thread Narolewski Jakub
I finally had some time to really look at this and even very basic implementation works great in my use case. Adding just functions enabling and disabling socket notifiers allows me to have finer control over when the stuff on my end gets deleted. There are still some crashes that I have to hunt do

Re: [Interest] QAbstractEventDispatcher - registerSocketNotifier(), unregisterSocketNotifier()

2019-12-30 Thread Thiago Macieira
On Monday, 30 December 2019 15:31:14 -03 Narolewski Jakub wrote: > I did not notice if unregisterTimer() and registerTimer() are also called > so often but their non-destructive switching could also come in handy. > Do you think that changing current QSocketNotifier::setEnabled( bool ) > behaviour

Re: [Interest] QAbstractEventDispatcher - registerSocketNotifier(), unregisterSocketNotifier()

2019-12-30 Thread Narolewski Jakub
This sounds like a great idea :] So, as a consistency is a prime property of every cake, in case of sockets this could be pair of: QAbstractEventDispatcher::enableSocketNotifier() QAbstractEventDispatcher::disableSocketNotifier() I did not notice if unregisterTimer() and registerTimer() are also

Re: [Interest] QAbstractEventDispatcher - registerSocketNotifier(), unregisterSocketNotifier()

2019-12-29 Thread Thiago Macieira
On Sunday, 29 December 2019 13:47:23 -03 Narolewski Jakub wrote: > Now, I have to do some fun optimization to not recreate libUV's poll > handlers every time notifier gets unregistered and actually destroy them > when they are not needed anymore, hmm. The better way would be to have a new virtual

Re: [Interest] QAbstractEventDispatcher - registerSocketNotifier(), unregisterSocketNotifier()

2019-12-29 Thread Narolewski Jakub
Answering my own question - QSocketNotifier gets unregistered in the event dispatcher every time QSocketNotifier::setEnabled(false) is called. Additionally, QSocketNotifier::setEnabled(false) is called after every write event on the descriptor. As I was sending data 20 times per second throught my

Re: [Interest] QAbstractEventDispatcher - registerSocketNotifier(), unregisterSocketNotifier()

2019-12-28 Thread Narolewski Jakub
My first email was scrubbed to HTML attachment - I'm resending it form different email client in hope of better visibility on the mailing list. I have this pet project of mine in which I'm testing the possibility of integrating libuv's event loop cleanly with Qt. After some research I come to conc

[Interest] QAbstractEventDispatcher - registerSocketNotifier(), unregisterSocketNotifier()

2019-12-28 Thread Jakub Narolewski
I have this pet project of mine in which I'm testing the possibility of integrating libuv's event loop cleanly with Qt.After some research I come to conclusion that custom class based on QAbstractEventDispatcher will be perfect for this. Some prototyping later and - give or take few bugs - it seems

Re: [Interest] QAbstractEventDispatcher

2013-09-05 Thread Thiago Macieira
On quinta-feira, 5 de setembro de 2013 10:43:31, Phil Hannent wrote: > Good morning, > > I am trying to implement my own event loop. I am trying to use > libpurple which uses glib with a Qt application I am developing [1]. > On Linux the application runs fine. On windows the application is > unsta

[Interest] QAbstractEventDispatcher

2013-09-05 Thread Phil Hannent
Good morning, I am trying to implement my own event loop. I am trying to use libpurple which uses glib with a Qt application I am developing [1]. On Linux the application runs fine. On windows the application is unstable and will freeze. Working on the assumption that the Windows version of Qt is