Hi MaGuoWei,
this is not a problem. If you look at the implementation of
SlotAllocationFuture.setFutureAction, you’ll see that the method is
synchronized on a lock which is also used to complete the future.
Furthermore, you’ll see that the slot variable is checked upon setting an
action and if it’s set the action will immediately be executed. Thus, if in
between calls 1 and 2 the future was completed, then the slot variable
would be set and thus also the action would be executed.
Cheers,
Till
On Wed, Aug 19, 2015 at 5:45 AM, MaGuoWei <
[hidden email]> wrote:
> Hi,guysThere are some codes in scheduleForExecution Function in
> Execution.java:
> 1. SlotAllocationFuture future =
> scheduler.scheduleQueued(toSchedule); 2.
> future.setFutureAction(new SlotAllocationFutureAction() {......})
> When scheduler finds some slot between line1 and line 2 the scheduler
> can't get the future action.
> Please let me know If I am wrong .
> Thanks.