Scala Programming Language
  1. Scala Programming Language
  2. SI-5623

SyncVar.take should have overload with timeout

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.0-M3
    • Component/s: Misc Library
    • Labels:
      None

      Description

      SyncVar has overloads of get with and without timeout. take only has a no-timeout overload. Adding one with timeout would be trivial, I think:

      def take(timeout: Long) = synchronized

      { try get(timeout) finally unset() }

        Activity

        Hide
        Heather Miller added a comment -

        Good suggestion, added in ce896d6

        Show
        Heather Miller added a comment - Good suggestion, added in ce896d6

          People

          • Assignee:
            Heather Miller
            Reporter:
            Seth LaForge
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development