[Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-26 Thread silvioprog
Thanks guys, I'll upgrade my Free Pascal now. :) I'm using queue to show a exception dialog in a thread. ps. My problem is partly explained on: http://lists.freepascal.org/lists/fpc-pascal/2013-April/037683.html -- Silvio Clécio My public projects - github.com/silvioprog --

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-25 Thread Michael Schnell
On 04/24/2013 04:42 PM, Hans-Peter Diettrich wrote: But AFAIK according inter-process communication is very platform specific, dunno what common means the RTL offers for such purposes. Obviously, the RTL alone can't do it. The dirty details of the EventQueue handling needs to be done in the

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-25 Thread Michael Schnell
On 04/24/2013 09:43 PM, Sven Barth wrote: I thought that you mean a future implementation of QueueAsyncCall Sorry for being not clear. I meant that I just don't know whether the current implementation of QueueAsyncCall, if called from the main thread, will do a call or will push an event to

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Van Canneyt
On Tue, 23 Apr 2013, silvioprog wrote: Hi, In FPC 2.7.1+ you've the Queue method, but it doesn't exists in FPC 2.6.2. So, what you uses instead it? The Synchronize method does not works in this case. To my knowledge, nothing is available. Michael. --

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Marco van de Voort
On Tue, Apr 23, 2013 at 08:34:53PM -0300, silvioprog wrote: In FPC 2.7.1+ you've the Queue method, but it doesn't exists in FPC 2.6.2. So, what you uses instead it? The Synchronize method does not works in this case. If Windows only, just use postmessage. --

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Schnell
On 04/24/2013 09:45 AM, Marco van de Voort wrote: On Tue, Apr 23, 2013 at 08:34:53PM -0300, silvioprog wrote: In FPC 2.7.1+ you've the Queue method, but it doesn't exists in FPC 2.6.2. So, what you uses instead it? The Synchronize method does not works in this case. If Windows only, just use

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Schnell
On 04/24/2013 01:34 AM, silvioprog wrote: In FPC 2.7.1+ you've the Queue method, but it doesn't exists in FPC 2.6.2. So, what you uses instead it? The Synchronize method does not works in this case. I'm implementing a small unit with some interfaces to use of sockets with TCP/IP protocol

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Van Canneyt
On Wed, 24 Apr 2013, Michael Schnell wrote: On 04/24/2013 01:34 AM, silvioprog wrote: In FPC 2.7.1+ you've the Queue method, but it doesn't exists in FPC 2.6.2. So, what you uses instead it? The Synchronize method does not works in this case. I'm implementing a small unit with some

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Schnell
On 04/24/2013 10:41 AM, Michael Van Canneyt wrote: By contrast it works only in lazarus GUI programs, and is useless e.g. for daemons. Of course I do know that (as I issued the request for a active non-GUI Widget Type with support for a Pascal EventQueue for multiple platforms - like mse

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Van Canneyt
On Wed, 24 Apr 2013, Michael Schnell wrote: On 04/24/2013 10:41 AM, Michael Van Canneyt wrote: By contrast it works only in lazarus GUI programs, and is useless e.g. for daemons. Of course I do know that (as I issued the request for a active non-GUI Widget Type with support for a Pascal

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Sven Barth
Am 24.04.2013 11:06, schrieb Michael Schnell: On 04/24/2013 10:41 AM, Michael Van Canneyt wrote: By contrast it works only in lazarus GUI programs, and is useless e.g. for daemons. Of course I do know that (as I issued the request for a active non-GUI Widget Type with support for a Pascal

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Schnell
On 04/24/2013 11:21 AM, Michael Van Canneyt wrote: Somewhere the main program loop must call checksynchronize, that is all. If that (i.e. doing a pseudo-queue in the user-code) is true for all platforms (which would mean that an EventQueue does exist and just is not polled automatically),

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Van Canneyt
On Wed, 24 Apr 2013, Michael Schnell wrote: On 04/24/2013 11:21 AM, Michael Van Canneyt wrote: Somewhere the main program loop must call checksynchronize, that is all. If that (i.e. doing a pseudo-queue in the user-code) is true for all platforms (which would mean that an EventQueue

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Sven Barth
Am 24.04.2013 11:25, schrieb Michael Schnell: On 04/24/2013 11:21 AM, Michael Van Canneyt wrote: Somewhere the main program loop must call checksynchronize, that is all. If that (i.e. doing a pseudo-queue in the user-code) is true for all platforms (which would mean that an EventQueue does

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Schnell
On 04/24/2013 11:32 AM, Sven Barth wrote: Please note that if you use TThread.Queue or TThread.Synchronize from within the main thread then your code won't be queued, but executed immediately. It is only designed for enqueing code execution for threads that are not the main thread. I see the

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Schnell
On 04/24/2013 11:34 AM, Sven Barth wrote: QueueAsyncCall is implemented/provided by the LCL not the RTL. OK. I understand. But this in fact is a very bad idea. -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Sven Barth
Am 24.04.2013 11:48, schrieb Michael Schnell: On 04/24/2013 11:34 AM, Sven Barth wrote: QueueAsyncCall is implemented/provided by the LCL not the RTL. OK. I understand. But this in fact is a very bad idea. QueueAsyncCall was implemented before TThread.Queue, because the Lazarus developers

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Sven Barth
Am 24.04.2013 11:44, schrieb Michael Schnell: On 04/24/2013 11:32 AM, Sven Barth wrote: Please note that if you use TThread.Queue or TThread.Synchronize from within the main thread then your code won't be queued, but executed immediately. It is only designed for enqueing code execution for

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Schnell
On 04/24/2013 11:48 AM, Sven Barth wrote: QueueAsyncCall was implemented before TThread.Queue, because the Lazarus developers thought it is a good idea (which I basically agree to)... Yep. But now it would be a good idea to overcome this situation - that obviously is introduced by two

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Van Canneyt
On Wed, 24 Apr 2013, Michael Schnell wrote: On 04/24/2013 11:48 AM, Sven Barth wrote: QueueAsyncCall was implemented before TThread.Queue, because the Lazarus developers thought it is a good idea (which I basically agree to)... Yep. But now it would be a good idea to overcome this

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Schnell
On 04/24/2013 12:34 PM, Michael Van Canneyt wrote: ´ What are you waiting for ? All you need to do is implement an event loop. All the rest is there. As I said, I already did try this some years ago Trying both to implement a new event queue mechanism (stolen from mse), and - better idea -

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Van Canneyt
On Wed, 24 Apr 2013, Michael Schnell wrote: On 04/24/2013 12:34 PM, Michael Van Canneyt wrote: ´ What are you waiting for ? All you need to do is implement an event loop. All the rest is there. As I said, I already did try this some years ago Trying both to implement a new event queue

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Marco van de Voort
On Wed, Apr 24, 2013 at 01:03:38PM +0200, Michael Van Canneyt wrote: Of course it can. You make the task far too complex. Start by NOT looking at the LCL code. You need simply to start with TCustomEventLoopApplication = Class(TCustomApplication) // Whatever end; Which abstracts

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Michael Schnell
On 04/24/2013 11:52 AM, Sven Barth wrote: QueueAsyncCall can't do anything different, because it needs to go through either TThread.Queue or TThread.Synchronize as the queue's implementation is not directly accessible from the outside and I don't intend to change this. It can't be true

Re: [Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-24 Thread Hans-Peter Diettrich
Michael Van Canneyt schrieb: On Wed, 24 Apr 2013, Michael Schnell wrote: On 04/24/2013 11:21 AM, Michael Van Canneyt wrote: Somewhere the main program loop must call checksynchronize, that is all. If that (i.e. doing a pseudo-queue in the user-code) is true for all platforms (which

[Lazarus] FPC 2.6.2 + Thread.Queue?

2013-04-23 Thread silvioprog
Hi, In FPC 2.7.1+ you've the Queue method, but it doesn't exists in FPC 2.6.2. So, what you uses instead it? The Synchronize method does not works in this case. I'm implementing a small unit with some interfaces to use of sockets with TCP/IP protocol easily, and I need to set compatibility with