<HTML><HEAD>
<META content="text/html; charset=ISO-8859-1" http-equiv=Content-Type></HEAD>
<BODY dir=ltr bgColor=#ffffff text=#000000>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<DIV> Hi Giuliano,</DIV>
<DIV> </DIV>
<DIV>All of our libraries, are heavily multithreaded, and use exclusively
reference counting with interfaces, as well as lazy evaluation nested object
reference counting for performance.</DIV>
<DIV>We have been doing this for over 11 years with great success, and we
continue to expand the functionality.</DIV>
<DIV>Not only is it doable, but it is nearly impossible to do really complex
heavily distributed threading without it. Trust me, I have been doing
multithreading since the days we had to implement it in interrupt cascades in
6502/6800 8 bit processors 30 years ago ;-) . I know what it takes to do it in
assembler, C, C++, Delphi, with and without OOP, as well as with and without
ref. canting ;-) . I have done them all...</DIV>
<DIV> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">With best
regards,<BR>Boian
Mitov<BR><BR>-------------------------------------------------------<BR>Mitov
Software<BR>www.mitov.com<BR>-------------------------------------------------------</DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A
title=giuliano.colla@fastwebnet.it
href="mailto:giuliano.colla@fastwebnet.it">Giuliano Colla</A> </DIV>
<DIV><B>Sent:</B> Saturday, September 20, 2014 11:33 AM</DIV>
<DIV><B>To:</B> <A title=fpc-devel@lists.freepascal.org
href="mailto:fpc-devel@lists.freepascal.org">FPC developers' list</A> </DIV>
<DIV><B>Subject:</B> Re: [fpc-devel] Suggestion: reference counted
objects</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV> </DIV>
<DIV class=moz-cite-prefix>Il 20/09/2014 19:20, Boian Mitov ha
scritto:<BR></DIV>
<BLOCKQUOTE cite=mid:F82691EEB35A484493CDD6A4703CE774@mpc1 type="cite">
<DIV dir=ltr>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<DIV> Hi Chriss,</DIV>
<DIV> </DIV>
<DIV>Personally I favor reference counted objects. While there are interfaces
as you pointed, and in Delphi you can even use smart pointers now, there is
still a lot of cases when you need to use objects, and have to manually free
them.</DIV>
<DIV>In single threaded environment that is not such an issue, but in parallel
and heavily multithreaded environments, reference counting is a life
saver.</DIV></DIV></DIV></BLOCKQUOTE><BR>Can you explain how reference counting
can be safely implemented in a parallel multithreaded environment, without
heavily affecting performance?<BR>A mere increment or decrement of count means
to get a lock and to release a lock on that object. Application code can know
what is thread safe and what is not, and use lock only when appropriate.<BR>A
general mechanism to be reliable should take into account all possibilities. If
it does, it will block threads even when unnecessary. If it doesn't, it will be
unsafe.<BR><BR>What do I miss?<BR><BR>Giuliano<BR><BR>
<P>
<HR>
_______________________________________________<BR>fpc-devel maillist
-
fpc-devel@lists.freepascal.org<BR>http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel<BR></DIV></DIV></DIV></BODY></HTML>