Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think the "native" issues you are talking about are not related to the way <code>TThread</code> is implemented, but to other aspects of the RTL:</p> <ul> <li>The memory manager is very fast and well written, but it fails to scale in a linear way when running with a number of concurrent threads on multiple cores;</li> <li>Reference-counted types (like <code>string</code> and <em>dynamic arrays</em>) are implemented with an asm <code>lock</code> opcode to have atomic reference counting (InterlockedDecrement/InterlockedIncrement in x64), which may also scale badly on multi-threaded applications (that is, all cores freezes when this opcode is executed - even if newer CPUs made progress about this, an <a href="http://en.wikipedia.org/wiki/Read-copy-update" rel="nofollow noreferrer">RCU</a> implementation may scale better).</li> </ul> <p>Those weakness are common to all multi-thread libraries - even <a href="http://otl.17slon.com" rel="nofollow noreferrer">OTL</a> will suffer about <a href="https://stackoverflow.com/questions/7226675">this</a>. They do exist since very early Delphi versions, and are still there with Delphi XE2. The 64 bit implementation is similar (even slower), and the Mac OS platform shares the very same implementation.</p> <p>Please see <a href="https://stackoverflow.com/questions/6072269/need-multi-threading-memory-manager/6076407#6076407">this other SO question</a> about how to write scaling multi-threaded applications in Delphi.</p> <p>To be honest, both points above will appear only on some very specific kind of applications.</p> <p>So there is nothing to worry about multi-threading in Delphi, if you know those points, and do not abuse of memory manager calls or string process in your threads.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload