Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1732

Support the use of Future from ExecutorService in InstanceProducer

    XMLWordPrintable

Details

    Description

      Open InstanceProducer with a option to set(Future<T>).

      @Inject
      Instance<T> inst; inst.get() would call future.get();

      Would allow for background creation of any exposed contextual object.

      @Inject @TestScoped
      private InstanceProducer<T> producer;
      
      @Inject
      private Instance<ExecutorService> executor;
      
      
      producer.set(executor.submit(Callable<T>))
      

      Questions:

      When is fire(T) called, when set(Future<T>) as now, or when Future is resovled?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aslak@redhat.com Aslak Knutsen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: