Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-5623

SyncVar.take should have overload with timeout

    Details

    • Type: Improvement
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.0-M3
    • Component/s: Library (Misc)
    • 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() }

        Attachments

          Activity

          Hide
          heathermiller Heather Miller added a comment -

          Good suggestion, added in ce896d6

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: