Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-09

Synchronize in Threads not working correctly on Gtk2 on Windows 32?

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Frank Church

I switched a program which I knew worked perfectly in Win32 to GTK2 and the Synchronize(@DispatchOutput) stopped working.

Is it a known bug?

I was working in the debugger so I will run it standalone to see if the problem still exists. I will check on Linux later.

/vfclists

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110918/035918bf/attachment.html>

Reply by email

Frank Church
to Frank Church
Frank Church wrote 12 lines
I switched a program which I knew worked perfectly in Win32 to GTK2 and the Synchronize(@DispatchOutput) stopped working. Is it a known bug? I was working in the debugger so I will run it standalone to see if the problem still exists. I will check on Linux later. /vfclists

Can anyone very this for me? I'd like to know if I am missing some settings or libraries or there is a bug in Gtk2 thread synchronization with the UI.

Show quoted text 6 lines
-- Frank Church ======================= http://devblog.brahmancreations.com
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110919/14bfd012/attachment.html>

Reply by email

Torsten Bonde Christiansen
to Frank Church
Frank Church wrote 20 lines
On 18 September 2011 13:28, Frank Church < <mailto:>> wrote: I switched a program which I knew worked perfectly in Win32 to GTK2 and the Synchronize(@DispatchOutput) stopped working. Is it a known bug? I was working in the debugger so I will run it standalone to see if the problem still exists. I will check on Linux later. /vfclists Can anyone very this for me? I'd like to know if I am missing some settings or libraries or there is a bug in Gtk2 thread synchronization with the UI.

Do you have a sample program or is there one in Lazarus examples, then i can check for Gtk2, x86_64 if you want.

Kind regards,
Torsten Bonde Christiansen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110919/c5acf906/attachment.html>

Reply by email

Frank Church
to Torsten Bonde Christiansen

2011/9/19 Torsten Bonde Christiansen

Show quoted text 27 lines
On 2011-09-19 10:56, Frank Church wrote: On 18 September 2011 13:28, Frank Church wrote: > I switched a program which I knew worked perfectly in Win32 to GTK2 and > the Synchronize(@DispatchOutput) stopped working. > > Is it a known bug? > > I was working in the debugger so I will run it standalone to see if the > problem still exists. I will check on Linux later. > > /vfclists > > > Can anyone very this for me? I'd like to know if I am missing some settings or libraries or there is a bug in Gtk2 thread synchronization with the UI. Do you have a sample program or is there one in Lazarus examples, then i can check for Gtk2, x86_64 if you want.

Give me a day or two and I will send you a stripped down version of the code.

Thanks

Show quoted text 10 lines
Kind regards, Torsten Bonde Christiansen. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110919/add5185b/attachment.html>

Reply by email

Michael Schnell
to Frank Church: I switched a program which I knew worked perfectly in Win32 to GTK2 and the…
Frank Church wrote
I switched a program which I knew worked perfectly in Win32 to GTK2 and the Synchronize(@DispatchOutput) stopped working.

I recently verified that TThread.Synchronize does work (in my testing program) in the current svn version of Lazarus. It did not work in some older versions.

If you find that it does not work for you (with the svn version), please do send me a short example, so that I can enhance my testing program for this case.

-Michael

Reply by email

Bernd
to Michael Schnell

2011/9/19 Michael Schnell :

I recently verified that TThread.Synchronize does work (in my testing program) in the current svn version of Lazarus. It did not work in some older versions.

IIRC there was a problem with older GTK2 versions (only really old versions, Ubuntu Hardy and older) and TThread.Sychronize not working. I can remember I was forced to work around this by implementing my own synchronizing mechanism with PostMessage() and RTLEventWaitFor() (sounds more complicated than it actually was, only a few lines of code).

There must be a thread about it here (but I can't remember its title) and also I believe there was a demo program somewhere that demonstrated this problem.

Reply by email

Michael Schnell
to Bernd
Bernd wrote 5 lines
There must be a thread about it here (but I can't remember its title) and also I believe there was a demo program somewhere that demonstrated this problem.

I did a demo program that tests several thread to mainthread signaling functions. It can be found in the bucktracker. I of course can provide the most recent source code on request.

-Michael

Reply by email