[concurrency-interest] LinkedTransferQueue in ForkJoinPool

David Holmes davidcholmes at aapt.net.au
Thu Jan 12 03:10:16 EST 2012


I suspect it was simply performance. The change went in around the same time
a bunch of work was done to control the creation of threads.

David
  -----Original Message-----
  From: concurrency-interest-bounces at cs.oswego.edu
[mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of Dr Heinz M.
Kabutz
  Sent: Thursday, 12 January 2012 6:04 PM
  To: Howard Lovatt
  Cc: concurrency-interest
  Subject: Re: [concurrency-interest] LinkedTransferQueue in ForkJoinPool


  Ah, sorry, I was looking at a much older version of the JDK 7.  You're
right - in 223 it is also using an array.

  However, the question remains - why was it changed from
LinkedTransferQueue to an array?

Regards

Heinz
--
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java(tm) Specialists' Newsletter"
Sun Java Champion
IEEE Certified Software Development Professional
http://www.javaspecialists.eu
Tel: +30 69 72 850 460
Skype: kabutz


  On 1/12/12 1:22 AM, Howard Lovatt wrote:
    Hi Heinz,


    I just had a quick look at the source for my Mac b223 and it uses an
array accessed via UNSAFE.


    I am probably looking in the wrong place - I looked in the source for
ForkJoinPool.java - where should I look?


    Cheers,


     -- Howard.


    On 12 January 2012 09:32, Dr Heinz M. Kabutz <heinz at javaspecialists.eu>
wrote:

      On my Mac 1.7.0 build 223, the ForkJoinPool still contains a
LinkedTransferQueue<ForkJoinTask<?>>.

      On Linux and Windows, 1.7.0_02 and 1.7.0_01 instead use an array of
ForkJoinTask.

      I had a look on the concurrency interest mailing archives and could
not find any discussion as to why this was changed.  Do any of you know the
story behind this?  I have my suspicions, but would prefer to hear it from
the guys who really know :-)

      Regards

      Heinz
      --
      Dr Heinz M. Kabutz (PhD CompSci)
      Author of "The Java(tm) Specialists' Newsletter"
      Sun Java Champion
      IEEE Certified Software Development Professional
      http://www.javaspecialists.eu
      Tel: +30 69 72 850 460
      Skype: kabutz

      _______________________________________________
      Concurrency-interest mailing list
      Concurrency-interest at cs.oswego.edu
      http://cs.oswego.edu/mailman/listinfo/concurrency-interest






    --
      -- Howard.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120112/9ec45c95/attachment-0001.html>


More information about the Concurrency-interest mailing list