Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-2399

Add asynchronous acquire to IgniteSemaphore

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • data structures
    • None

    Description

      Usually a permit acquisition is followed by an action, followed by a release of the permit. A simple enhancement to the existing Semaphore API can be made that enables asynchronous acquire:

      <T> IgniteFuture<T> acquireAndExecute(Callable<T> action, int numPermits);

      The method would immediately return a future to be later completed by the action's result. Permits are to be released after the future is completed.

      Attachments

        Issue Links

          Activity

            People

              atri Atri Sharma
              vladisav Vladisav Jelisavcic
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h