Results 1 to 2 of 2
  1. #1
    illidian is offline Member
    Join Date
    Mar 2008
    Posts
    1
    Rep Power
    0

    Default Question about CAS (compare and swap) method

    CAS method can fail because of 2 reasons:
    1. - the operation was failed because of other thread.
    2. - the comparison was failed.

    The question is: how I know the reason of failure? Because in first case I probably whould like to retry operation in loop until it succeeded, but in second case loop will be infinite.

    Thanks.

  2. #2
    new_2_java is offline Member
    Join Date
    Feb 2008
    Posts
    60
    Rep Power
    0

Similar Threads

  1. Simple Method Question
    By Froz3n777 in forum New To Java
    Replies: 2
    Last Post: 02-13-2008, 02:39 AM
  2. Return question in a method.
    By MetalGear in forum New To Java
    Replies: 1
    Last Post: 01-13-2008, 04:45 AM
  3. how to swap 2 numbers
    By mary in forum Advanced Java
    Replies: 1
    Last Post: 08-02-2007, 05:32 PM
  4. Compare 2 XML
    By Peter in forum XML
    Replies: 1
    Last Post: 07-05-2007, 02:58 AM
  5. compare speed
    By bbq in forum JDBC
    Replies: 1
    Last Post: 06-28-2007, 05:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •