On 10/09/2011 01:22 AM, Frank Church wrote:
Are multiple critical sections allowed in form or data module?
I don't understand your concern.
A DataModule is a way to organize the makeup and dependance of objects
(so strictly a question of data in memory).
A CriticalSection is a way to
On 10/09/2011 09:14 AM, Frank Church wrote:
Do you mean that TCriticalSection is part of the LCL and shouldn't be
run from within a thread, or that code within the thread or the
critical section must not run code accessing the LCL?
TCriticalSection is obviously done to be used in Thread.
On 10/09/2011 09:55 AM, Mattias Gaertner wrote:
All LCL code that deals with Application, ... is
not thread safe and should only be accessed by the main thread.
Hmmm.
Application.QueuAsyncCall() is obviously created to be called by a thread.
So it's necessary to read the documentation to be
On 10/09/2011 09:55 AM, Mattias Gaertner wrote:
On Sun, 9 Oct 2011 08:14:41 +0100
Frank Churchvfcli...@gmail.com wrote:
How is it determined whether a piece of code runs within the LCL or not?
if GetCurrentThreadID=MainThreadID then
I understand his question as How to find out whether a
On 10/09/2011 10:49 AM, Hans-Peter Diettrich wrote:
The LCL is not reentrant. All code accessing the LCL should run in the
main thread (see Synchronize...), not in other threads.
Not true in this intensity.
There are functions in the LCL especially doe not be called by worker
Threads, and
On 10/09/2011 02:37 PM, Hans-Peter Diettrich wrote:
Mattias Gaertner schrieb:
Most LCL code is reentrant.
Only within the context of an single thread.
In a single threadded application only recursive functions can have
reentrancy problems.
As nearly all user code is done as an event
On 10/09/2011 03:14 PM, Michael Van Canneyt wrote:
It's not so on Unix. X-Windows is definitely not thread-safe.
Of course in general this is correct.
But I understand that it should be possible that an application (using
additional threads) creates more than one Main Frame by attaching to a
On 10/10/2011 10:23 AM, Michael Schnell wrote:
type:
There are functions in the LCL especially done be called by worker
Threads,...
-Michael
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
Type: LCL
-Michael
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
On Sun, Oct 09, 2011 at 03:14:54PM +0200, Michael Van Canneyt wrote:
It's not so on Unix. X-Windows is definitely not thread-safe.
And neither is OpenGL (and afaik Direct X also)
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
On Mon, 10 Oct 2011, Michael Schnell wrote:
On 10/09/2011 03:14 PM, Michael Van Canneyt wrote:
It's not so on Unix. X-Windows is definitely not thread-safe.
Of course in general this is correct.
But I understand that it should be possible that an application (using
additional threads)
Michael Schnell schrieb:
In fact the help for any LCL and RTL function should say how it can be
used regarding threads.
Currently it's sufficient to know that the LCL is not threadsafe.
It is known that any function that accesses the GUI can only be called
by the main thread.
That's one
On 10/10/2011 10:34 AM, michael.vancann...@wisa.be wrote:
I don't think that the LCL should support this.
I did not want to suggest that it should (IMHO it would be nice to
have this as a special Application type, but it's (a) not easy to do and
(b) quite low priority. I in fact do have a
Michael Schnell schrieb:
On 10/09/2011 03:14 PM, Michael Van Canneyt wrote:
It's not so on Unix. X-Windows is definitely not thread-safe.
Of course in general this is correct.
But I understand that it should be possible that an application (using
additional threads) creates more than one
On 10/10/2011 11:36 AM, Hans-Peter Diettrich wrote:
Michael Schnell schrieb:
In fact the help for any LCL and RTL function should say how it can
be used regarding threads.
Currently it's sufficient to know that the LCL is not threadsafe.
So you claim that nobody should use
On Sun, 9 Oct 2011 00:22:10 +0100
Frank Church vfcli...@gmail.com wrote:
Are multiple critical sections allowed in form or data module?
e.g. I have different datasets each with its own connection and queries that
threads need to lookup data from.
Is it acceptable to have additional
On 9 October 2011 07:30, Mattias Gaertner nc-gaert...@netcologne.de wrote:
On Sun, 9 Oct 2011 00:22:10 +0100
Frank Church vfcli...@gmail.com wrote:
Are multiple critical sections allowed in form or data module?
e.g. I have different datasets each with its own connection and queries
that
Frank Church schrieb:
Is it acceptable to have additional TCriticalSections on the form?
Yes.
I hope you are aware that all code accessing the LCL must run in the
main thread.
Mattias
Can you explain this?
A critical section blocks all code, that wants to enter the
On Sun, 9 Oct 2011 08:14:41 +0100
Frank Church vfcli...@gmail.com wrote:
On 9 October 2011 07:30, Mattias Gaertner nc-gaert...@netcologne.de wrote:
On Sun, 9 Oct 2011 00:22:10 +0100
Frank Church vfcli...@gmail.com wrote:
Are multiple critical sections allowed in form or data module?
On Sun, 09 Oct 2011 10:49:31 +0200
Hans-Peter Diettrich drdiettri...@aol.com wrote:
[...]
The LCL is not reentrant.
Most LCL code is reentrant. An event can trigger an event.
On of the few exceptions is destroying a control. That's why there is
Application.ReleaseComponent.
[...]
Mattias
Mattias Gaertner schrieb:
On Sun, 09 Oct 2011 10:49:31 +0200
Hans-Peter Diettrich drdiettri...@aol.com wrote:
[...]
The LCL is not reentrant.
Most LCL code is reentrant.
Only within the context of an single thread.
This was acceptable on traditional single-CPU/core machines, but
On Sun, 9 Oct 2011, Hans-Peter Diettrich wrote:
Mattias Gaertner schrieb:
On Sun, 09 Oct 2011 10:49:31 +0200
Hans-Peter Diettrich drdiettri...@aol.com wrote:
[...]
The LCL is not reentrant.
Most LCL code is reentrant.
Only within the context of an single thread.
This was acceptable
Michael Van Canneyt schrieb:
On Sun, 9 Oct 2011, Hans-Peter Diettrich wrote:
Mattias Gaertner schrieb:
On Sun, 09 Oct 2011 10:49:31 +0200
Hans-Peter Diettrich drdiettri...@aol.com wrote:
[...]
The LCL is not reentrant.
Most LCL code is reentrant.
Only within the context of an single
Are multiple critical sections allowed in form or data module?
e.g. I have different datasets each with its own connection and queries that
threads need to lookup data from.
Is it acceptable to have additional TCriticalSections on the form?
--
Frank Church
===
24 matches
Mail list logo