>> TDummyThread.Create(True)
> Huh, I have memory leak with this.
> Should it not be: --> TDummyThread.Create(false) ? (because with this, no
> memory leak)
Hello.
Sorry to come back with this but without answer I am still full of doubt.
Is TDummyThread.Create(True) wanted and so the du
> TDummyThread.Create(True)
Huh, I have memory leak with this.
Should it not be: --> TDummyThread.Create(false) ? (because with this, no
memory leak)
Fre;D
-
Many thanks ;-)
--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/Call-function-in-shared-libra
On Fri, Mar 31, 2017 at 1:15 PM, Henry Vermaak
wrote:
> On Fri, Mar 31, 2017 at 08:42:24AM -0700, fredvs wrote:
> > > Z:\home\fred\uos\examples\uos.pas(7438,29) Warning: (4046)
> Constructing a
> > > class "TThread" with abstract method "Execute"
> >
> > Huh, is it Is it serious doctor?
>
> I use
Michael Van Canneyt wrote
> Best is probably:
>
> Type
>TDummyThread = Class(TThread)
>public
> procedure execute; override;
>end;
>
> procedure TDummyThread.Execute;
>
> begin
>FreeOnTerminate:=True;
>Terminate;
> end;
>
>
> begin
>TDummyThread.Create(True)
> end.
On Fri, Mar 31, 2017 at 08:42:24AM -0700, fredvs wrote:
> > Z:\home\fred\uos\examples\uos.pas(7438,29) Warning: (4046) Constructing a
> > class "TThread" with abstract method "Execute"
>
> Huh, is it Is it serious doctor?
I use this:
function DummyThread(param: pointer): ptrint;
begin
Result :
On Fri, 31 Mar 2017, fredvs wrote:
Hello.
Michael Van Canneyt wrote
To fix that, you can do the following.
In the library startup code, create a dummy thread.
This will initialize the threads mechanism:
with TThread.Create(False) do
end.
I use this for initialize my libraries:
B
Hello.
Michael Van Canneyt wrote
> To fix that, you can do the following.
> In the library startup code, create a dummy thread.
> This will initialize the threads mechanism:
>
>with TThread.Create(False) do
>
> end.
I use this for initialize my libraries:
With TThread.Create(False) do
Thanks a lot! Seems to working fine now
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
On Thu, 30 Mar 2017, Michael Van Canneyt wrote:
On Thu, 30 Mar 2017, Krzysztof wrote:
2017-03-30 15:19 GMT+02:00 Michael Van Canneyt
Nevertheless, that should work.
I've used it in multi-threaded apache modules.
Well it doesn't work or fpjson module is not thread safe in this case.
On Thu, 30 Mar 2017, Krzysztof wrote:
2017-03-30 15:19 GMT+02:00 Michael Van Canneyt
Nevertheless, that should work.
I've used it in multi-threaded apache modules.
Well it doesn't work or fpjson module is not thread safe in this case. You
can test it by yourself with attached demo (fir
2017-03-30 15:19 GMT+02:00 Michael Van Canneyt
>
>
> Nevertheless, that should work.
>
> I've used it in multi-threaded apache modules.
>
Well it doesn't work or fpjson module is not thread safe in this case. You
can test it by yourself with attached demo (first post). Try it few times
because so
On Thu, 30 Mar 2017, Michael Van Canneyt wrote:
On Thu, 30 Mar 2017, Krzysztof wrote:
Yes, I'm aware of cthreads and tested it too (without it also critical
sections don't work) but it doesn't help with attached examples. Still same
errors in logs
Nevertheless, that should work.
I shou
On Thu, 30 Mar 2017, Krzysztof wrote:
Yes, I'm aware of cthreads and tested it too (without it also critical
sections don't work) but it doesn't help with attached examples. Still same
errors in logs
Nevertheless, that should work.
I've used it in multi-threaded apache modules.
Michael.
__
Yes, I'm aware of cthreads and tested it too (without it also critical
sections don't work) but it doesn't help with attached examples. Still same
errors in logs
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-b
On Thu, 30 Mar 2017, Krzysztof wrote:
Hi,
I'm wondering if shared libraries (on Linux) support call exported function
from multiple threads. I made small demo. Threads send JSON PChar into
shared lib function which parse it and log in syslog. No global vars,
everything locally in function. Bu
Hi,
I'm wondering if shared libraries (on Linux) support call exported function
from multiple threads. I made small demo. Threads send JSON PChar into
shared lib function which parse it and log in syslog. No global vars,
everything locally in function. But even that I'm getting random errors
like:
16 matches
Mail list logo