Community
Participate
Working Groups
Created attachment 183999 [details] Proposed enhancement I'm thinking that the Sequence class should internally allow to use the ImmediateExecutor instead of the DsfExecutor. First, notice that the first step (executeStep(0)) is executed on the current thread. Therefore, it is up to the user of the Sequence, to make sure it is called on the DsfExecutor. (Maybe that is a bug...) Therefore, if the user must make sure to call the Sequence using a DsfExecutor, why wouldn't she also need to make sure to call Sequence.RM.done() on the DsfExecutor? As long as this is done right by the user, then there is no need to have another redirect towards the DsfExecutor within Sequence.RM. I believe this is the case we are always falling into, and therefore Sequence.RM should use the ImmediateExecutor. Maybe the general opinion will be that it is better to play it safe and protect the sequence against user mistakes. (or maybe there is a case where Sequence.RM.done() can be called outside the DsfExecutor. In that case, we should first call executeStep(0) on the DsfExecutor. But we could also use the new ImmediateInDsfExecutor class inside Sequence. It would provide the ImmediateExecutor most of the time, and if the user makes a mistake, it would fall back to the DsfExecutor. The attached patched does this. I haven't run the DsfSequence tests yet, I'll wait for feedback to see if this a good idea at all.
I don't see any obvious problem with the change, but I wonder what would be the benefit?
(In reply to comment #1) > I don't see any obvious problem with the change, but I wonder what would be the > benefit? It would make the steps in the sequence be executed directly one after the other, instead of potentially being interleaved with other DsfExecutor tasks. But I have to admit that there is not real good reason to demand such a behavior, I just felt it was somehow more efficient... But it may be a psychological thing :-) Feel free to make as WONT FIX, if you don't see a value. The risk is probably not worth it.
Everyone is too busy for this low value enhancement.