Hi Anton,

I call it directly, in order not to allocate handlers, if you create a class with a handle and post a message to it, it will be the same as using TTimer directly, because you will use as many resources as TTimer would use (1 handle per instance), unless you create a class that is derived from TICSWndControl (Which I´m trying to do, but I found a bug in its message handling implementation and I´m waiting for someone to check it), than you can share some resources.

I just created this class because I was using many resources and resources are limited ;)

But I was thinking on something, and I would like someone to confirm it or explain me better

Using for example, 1.000 instances of TTimer at 1 second triggering, the messages will be received and processed *in a loop* at the main thread, wouldn´t be almost the same as having a loop to trigger the event of all ttimers by the shared timer?

Eric

--------------------------------------------------
From: "Anton S." <an...@rambler.ru>
Sent: Wednesday, August 18, 2010 10:48 AM
To: <twsocket@elists.org>
Subject: Re: [twsocket] ICS Message handlers

Eric, talking about your shared timer: do you call OnTimer of all attached objects directly or post WM_TIMER to them? I had though over the same timer class and that was my idea to broadcast timer signal. I think it'll eliminate the issue of blocking during loop since PostMessage is asynchronous. But I'm not sure, maybe it'll overload message queues.

--
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be




Nenhum virus encontrado nessa mensagem recebida.
Verificado por AVG - www.avgbrasil.com.br
Versao: 9.0.851 / Banco de dados de virus: 271.1.1/3079 - Data de Lancamento: 08/18/10 03:35:00

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to