Re: [twsocket] Architectural question II

2007-03-27 Thread Arno Garrels
Arno Garrels wrote: That was my first idea as well, so yesterday I already implemented simple timers into OverbyteIcsWndControl.pas (ignoring .NET compatibility). It's currently part of TIcsWndControl and implemented as TCollection/TCollectionItem. If that is too much overhead for all classes

Re: [twsocket] Architectural question II

2007-03-27 Thread Arno Garrels
Arno Garrels wrote: What do you think? As stated above, by first opinion is simply to ignore older OS. That was my first idea as well, so yesterday I already implemented simple timers into OverbyteIcsWndControl.pas (ignoring .NET compatibility). It's currently part of TIcsWndControl and

Re: [twsocket] Architectural question II

2007-03-27 Thread Francois PIETTE
-- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: Arno Garrels [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Tuesday, March 27, 2007 9:07 PM Subject: Re: [twsocket] Architectural question II Arno Garrels wrote: What do you think? As stated

Re: [twsocket] Architectural question II

2007-03-26 Thread Arno Garrels
Francois PIETTE wrote: In V6, this is a single window for all timers in a single thread. In V5, there is a window for each component and that window is used for the timer. So in both cases, there not a single hidden window dedicated to the timers. That's true, however it does not solve the

Re: [twsocket] Architectural question II

2007-03-26 Thread Francois Piette
That's true, however it does not solve the main problem with timers in ICS. The general problem with timers (beside the question which window to use) is that they are a limited resource. As far as I know, timer are no more a limited resource sinceW2K. If we want support of timer per

Re: [twsocket] Architectural question II

2007-03-26 Thread Arno Garrels
What do you think? As stated above, by first opinion is simply to ignore older OS. That was my first idea as well, so yesterday I already implemented simple timers into OverbyteIcsWndControl.pas (ignoring .NET compatibility). It's currently part of TIcsWndControl and implemented as

Re: [twsocket] Architectural question II

2007-03-22 Thread Arno Garrels
: Re: [twsocket] Architectural question II Francois Piette wrote: Don't use TTimer in any worker thread since it is NOT thread- safe! Why is it used in HttpCli then ? see THttpCli.SendRequest That's true, I would not define UseBandwidthControl in multithreaded applications until

Re: [twsocket] Architectural question II

2007-03-22 Thread Tobias Rapp
Something like attached below? It creates its window thread-save, but I prefer a timer that was able to use the hidden window(s) of V6, or may be we think about a windowless timer (Thread, signals, and WaitForMultipleObjects)? Just for interest: What is the drawback of using a own window

Re: [twsocket] Architectural question II

2007-03-22 Thread Arno Garrels
Tobias Rapp wrote: Something like attached below? It creates its window thread-save, but I prefer a timer that was able to use the hidden window(s) of V6, or may be we think about a windowless timer (Thread, signals, and WaitForMultipleObjects)? Just for interest: What is the drawback of

Re: [twsocket] Architectural question II

2007-03-22 Thread Francois PIETTE
I do not understand who shall handle the WM_TIMER messages? Currently TIcsWndControl skips message numbers below WM_USER, do you want to change that? WParam of WM_TIMER can hold a custom 32 bits value like an object reference. In V5, the component hidden window can handle the message. In

Re: [twsocket] Architectural question II

2007-03-21 Thread Arno Garrels
Markus Humm wrote: Hello, regarding my question from last weekend only a part was answered so far. The thing is now: if several TTimers get fired at the same time and all of them want to write into a shared TStringList-Type buffer (okay, it's in a wrapper class), how to make sure only one

Re: [twsocket] Architectural question II

2007-03-21 Thread Paul
: [twsocket] Architectural question II Markus Humm wrote: Hello, regarding my question from last weekend only a part was answered so far. The thing is now: if several TTimers get fired at the same time and all of them want to write into a shared TStringList-Type buffer (okay, it's

Re: [twsocket] Architectural question II

2007-03-21 Thread Arno Garrels
] http://www.overbyte.be/eng/overbyte/teamics.html Paul - Original Message - From: Arno Garrels [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Wednesday, March 21, 2007 8:32 AM Subject: Re: [twsocket] Architectural question II Markus Humm wrote: Hello

Re: [twsocket] Architectural question II

2007-03-21 Thread Francois Piette
Don't use TTimer in any worker thread since it is NOT thread-safe! Why is it used in HttpCli then ? see THttpCli.SendRequest That's true, I would not define UseBandwidthControl in multithreaded applications until a thread-safe timer becomes available. We could use a bare bone API

Re: [twsocket] Architectural question II

2007-03-21 Thread Arno Garrels
Francois Piette wrote: Don't use TTimer in any worker thread since it is NOT thread-safe! Why is it used in HttpCli then ? see THttpCli.SendRequest That's true, I would not define UseBandwidthControl in multithreaded applications until a thread-safe timer becomes available. We could

Re: [twsocket] Architectural question II

2007-03-21 Thread Francois PIETTE
://www.overbyte.be - Original Message - From: Arno Garrels [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Wednesday, March 21, 2007 4:42 PM Subject: Re: [twsocket] Architectural question II Francois Piette wrote: Don't use TTimer in any worker thread since it is NOT thread-safe

Re: [twsocket] Architectural question II

2007-03-20 Thread Bevan Edwards
Why not have a single thread responsible for doing that and then just have the TTimers use PostThreadMessage to request the update? Markus Humm wrote: Hello, regarding my question from last weekend only a part was answered so far. The thing is now: if several TTimers get fired at the same

Re: [twsocket] Architectural question II

2007-03-20 Thread david . lyon
The correct way is to use a semaphore. These do all the management on exclusive resources. There are lots of classes out there to download that implement. Semephores are built-in to the operating system. Markus Humm wrote: Hello, regarding my question from last weekend only a part was

Re: [twsocket] Architectural question

2007-03-18 Thread Wilfried Mestdagh
Hello Markus, TCriticalSection will protect your StringList among multiple threads, so that's ok. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- To unsubscribe or change your settings for TWSocket mailing list please goto