-Original message-
From: Dariusz Mazur
Sent: Fri 18-09-2009 16:24
To: FPC-Pascal users discussions ;
Subject: Re: [fpc-pascal] getting started with threads
> David Emerson pisze:
> > I am getting started with threads (linux/cthreads) and I'm very happy so
> > far, but unsure of the best
On 18 Sep 2009, at 23:04, Dariusz Mazur wrote:
But is this optimal solution:
procedure SysThreadSwitch;
begin
Sleep(0);
end;
WinThreadManager.ThreadSwitch :=...@systhreadswitch;
procedure ThreadSwitch;
begin
CurrentTM.ThreadSwitch;
end;
We have 2 unnecessary invoke functio
Jonas Maebe pisze:
On 18 Sep 2009, at 21:30, Dariusz Mazur wrote:
On 18 Sep 2009, at 16:24, Dariusz Mazur wrote:
I use own lockfree FIFO http://www.emadar.com/fpc/lockfree.htm to
distribute task between threads
its much faster and well scaling on multicore.
Note that it won't work as is
On 18 Sep 2009, at 21:30, Dariusz Mazur wrote:
On 18 Sep 2009, at 16:24, Dariusz Mazur wrote:
I use own lockfree FIFO http://www.emadar.com/fpc/lockfree.htm to
distribute task between threads
its much faster and well scaling on multicore.
Note that it won't work as is on non-x86 machines
Jonas Maebe pisze:
On 18 Sep 2009, at 16:24, Dariusz Mazur wrote:
I use own lockfree FIFO http://www.emadar.com/fpc/lockfree.htm to
distribute task between threads
its much faster and well scaling on multicore.
Note that it won't work as is on non-x86 machines, because it's
missing memory
Jonas Maebe schrieb:
>
> On 18 Sep 2009, at 16:24, Dariusz Mazur wrote:
>
>> I use own lockfree FIFO http://www.emadar.com/fpc/lockfree.htm to
>> distribute task between threads
>> its much faster and well scaling on multicore.
>
> Note that it won't work as is on non-x86 machines, because it's
On 18 Sep 2009, at 16:24, Dariusz Mazur wrote:
I use own lockfree FIFO http://www.emadar.com/fpc/lockfree.htm to
distribute task between threads
its much faster and well scaling on multicore.
Note that it won't work as is on non-x86 machines, because it's
missing memory barriers (and I th
David Emerson pisze:
I am getting started with threads (linux/cthreads) and I'm very happy so
far, but unsure of the best way to tackle my situation.
I have a program that needs to perform about 10,000 independent tasks,
which usually involve waiting for I/O; thus it makes sense to use
severa
Florian Klaempfl het geskryf:
>
> Hope you find a good cross platform solution :)
So far I have single interface for create/destroy/lock/unlock of
semaphores for Windows, Linux, *BSD. The latter two is actually for all
unix with posix systems. So no more IFDEF's and specific uses clauses
units in
On 18 Sep 2009, at 12:12, Martin wrote:
Should semaphores be on the thread manager?
because imho they are not realy thread related? They can be used by
threads, but they have lot's of other uses. Even communication
between processes of different applications. They are usually
grouped tog
just a question:
Should semaphores be on the thread manager?
because imho they are not realy thread related? They can be used by
threads, but they have lot's of other uses. Even communication between
processes of different applications. They are usually grouped together
with other IPC like ms
On 18 Sep 2009, at 11:42, Graeme Geldenhuys wrote:
Jonas Maebe het geskryf:
I guess you mean that there aren't any :)
True and False. :) It was recommended to me that I use the methods
directly from the thread manager, then later it was not recommended.
It's because there is no cross-pla
Graeme Geldenhuys schrieb:
> Jonas Maebe het geskryf:
>> I guess you mean that there aren't any :)
>
> True and False. :) It was recommended to me that I use the methods
> directly from the thread manager, then later it was not recommended.
> Plus the methods available from the thread manager doe
Jonas Maebe het geskryf:
>
> I guess you mean that there aren't any :)
True and False. :) It was recommended to me that I use the methods
directly from the thread manager, then later it was not recommended.
Plus the methods available from the thread manager doesn't support
initial max values for
On 18 Sep 2009, at 10:12, Graeme Geldenhuys wrote:
And I'm working on cross-platform semaphore classes / methods because
the current ones in FPC are totally useless.
I guess you mean that there aren't any :)
Jonas
___
fpc-pascal maillist - fpc-p
Luca Olivetti het geskryf:
>
> There are some cross-platform synchronization classes in syncobjs
>
> http://www.freepascal.org/docs-html/fcl/syncobjs/index.html
And I'm working on cross-platform semaphore classes / methods because
the current ones in FPC are totally useless.
Regards,
- Graem
David Emerson schreef:
I am getting started with threads (linux/cthreads) and I'm very happy so
far, but unsure of the best way to tackle my situation.
I have a program that needs to perform about 10,000 independent tasks,
which usually involve waiting for I/O; thus it makes sense to use
seve
En/na Tobias Giesen ha escrit:
Also possible but not easier. Threads should not be started or
stopped for each task, instead they should wait for an event telling
them to continue with the next task. For example using SetEvent /
ResetEvent as well as:
{$ifdef win32}
WaitForSingleObject(Contin
18 matches
Mail list logo