Re: [fpc-devel] TThread extensions

2014-06-27 Thread Michael Schnell
On 06/26/2014 07:49 PM, Mattias Gaertner wrote: Why can't you use trunk and $IFs like everyone else? I do _need_ TThread.Queue (and I do _need_ TThread.GetTickCount64 (or another decent timing source). The released rtl version does not have TThread.Queue and for timing only fpgettimeofday() i

Re: [fpc-devel] TThread extensions

2014-06-27 Thread Mattias Gaertner
On Fri, 27 Jun 2014 09:30:52 +0200 Michael Schnell wrote: > On 06/26/2014 07:49 PM, Mattias Gaertner wrote: > > Why can't you use trunk and $IFs like everyone else? > I do _need_ TThread.Queue (and I do _need_ TThread.GetTickCount64 (or > another decent timing source). > > The released rtl vers

Re: [fpc-devel] TThread extensions

2014-06-27 Thread Michael Schnell
On 06/27/2014 10:19 AM, Mattias Gaertner wrote: In other words: Nothing stops you, except yourself. Yep. (see the discussion in lazarus-devel.) -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/ma

Re: [fpc-devel] TThread extensions

2014-06-27 Thread Henry Vermaak
On Fri, Jun 27, 2014 at 09:30:52AM +0200, Michael Schnell wrote: > The released rtl version does not have TThread.Queue and for timing > only fpgettimeofday() is provided, which is not a "permanent > ticker"-source but jumps back and foreword when the UTC system time > is updated. The latest relea

Re: [fpc-devel] TThread extensions

2014-06-27 Thread Michael Schnell
On 06/26/2014 03:20 PM, Michael Schnell wrote: P.S.: perhaps the project is not even doable (in a perfectly compatible way) with the (Delphi compatible) implementation of TThread.Queue. (I just would need to be able to feed an Event in the Queue, but those means are "private" in TThread.) So

[fpc-devel] TTimers and TThreads. Attn Michael Schnell

2014-06-27 Thread Giuliano Colla
I've faced problems similar to yours in the past, and I've successfully used a simple and quite effective scheme: 1) a list of timer events, ordered by expiration time. Each entry holds the absolute time, and the action to take (the semaphore to signal, where a thread is waiting, in my case).

Re: [fpc-devel] TTimers and TThreads. Attn Michael Schnell

2014-06-27 Thread Michael Schnell
On 06/27/2014 12:54 PM, Giuliano Colla wrote: 1) a list of timer events, ordered by expiration time. Thanks for the pointers. I in fact do something similar. My TTimer class has a class variable that is a dynamic array of TTimers. When the program is going to wait for anything (a timer or a

Re: [fpc-devel] TTimers and TThreads. Attn Michael Schnell

2014-06-27 Thread Giuliano Colla
Il 27/06/2014 13:10, Michael Schnell ha scritto: On 06/27/2014 12:54 PM, Giuliano Colla wrote: 1) a list of timer events, ordered by expiration time. Thanks for the pointers. I in fact do something similar. My TTimer class has a class variable that is a dynamic array of TTimers. When the pr

Re: [fpc-devel] TTimers and TThreads. Attn Michael Schnell

2014-06-27 Thread Hans-Peter Diettrich
Giuliano Colla schrieb: If you're using relative times and not absolute ones, then you may avoid the search, without need to resort, using a slightly different scheme, i.e. entering in a sorted list the times *relatives to the previous one*. Then your queue can run out of sync with the absolu

Re: [fpc-devel] TTimers and TThreads. Attn Michael Schnell

2014-06-27 Thread Giuliano Colla
Il 27/06/2014 20:01, Hans-Peter Diettrich ha scritto: Giuliano Colla schrieb: If you're using relative times and not absolute ones, then you may avoid the search, without need to resort, using a slightly different scheme, i.e. entering in a sorted list the times *relatives to the previous one