Opened 10 years ago
Closed 7 years ago
#2258 closed enhancement (done)
Executable.Start executes it asynchronously
Reported by: | mkommend | Owned by: | jkarder |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.15 |
Component: | Optimization | Version: | 3.3.10 |
Keywords: | Cc: |
Description
While the name suggests that this method is executed synchronously, it runs in fact asynchronously. Hence, in every script and program code synchronization mechanisms must be used to wait until the executable is finished. It would be better to have a separate way to start the executable in a synchronous way.
The standard in the .NET framework is that asynchronous methods have the postfix async attached to the method name, which would lead to the two methods Start and StartAsync. Though, changing the semantics of Start from asynchronous to synchronous execution would require lots of code changes and break existing script. Maybe, it would be better to add a method StartSync to the executable interface.
Change History (39)
comment:1 Changed 10 years ago by swagner
- Milestone changed from HeuristicLab 3.3.x Backlog to HeuristicLab 3.3.11
- Owner changed from architects to swagner
- Status changed from new to assigned
comment:2 Changed 10 years ago by ascheibe
comment:3 Changed 10 years ago by swagner
comment:4 Changed 10 years ago by swagner
comment:5 Changed 10 years ago by swagner
comment:6 Changed 10 years ago by ascheibe
- Milestone changed from HeuristicLab 3.3.11 to HeuristicLab 3.3.12
comment:7 Changed 9 years ago by ascheibe
- Milestone changed from HeuristicLab 3.3.12 to HeuristicLab 3.3.13
comment:8 Changed 9 years ago by ascheibe
- Milestone changed from HeuristicLab 3.3.13 to HeuristicLab 4.0
comment:9 Changed 9 years ago by jkarder
- Owner changed from swagner to jkarder
- Status changed from assigned to accepted
comment:10 Changed 9 years ago by jkarder
comment:11 Changed 9 years ago by jkarder
comment:12 Changed 9 years ago by jkarder
r13349: added StartAsync to IExecutable
comment:13 Changed 9 years ago by jkarder
r13354: improved cancellation support
comment:14 Changed 9 years ago by jkarder
r13355: updated unit test utils
comment:15 Changed 9 years ago by ascheibe
- Owner changed from jkarder to ascheibe
- Status changed from accepted to reviewing
comment:16 Changed 8 years ago by ascheibe
- Owner changed from ascheibe to mkommend
comment:17 Changed 8 years ago by jkarder
- Milestone changed from HeuristicLab 4.0 to HeuristicLab 3.3.15
- Owner changed from mkommend to abeham
comment:18 Changed 7 years ago by jkarder
- Owner changed from abeham to jkarder
- Status changed from reviewing to assigned
comment:19 Changed 7 years ago by jkarder
- Status changed from assigned to accepted
comment:20 Changed 7 years ago by jkarder
r15065: refactored async methods
- synchronously called IExecutables are now executed in the caller's thread
- removed old synchronization code from unit tests
comment:21 Changed 7 years ago by jkarder
- Owner changed from jkarder to abeham
- Status changed from accepted to reviewing
comment:22 Changed 7 years ago by abeham
r15190: fixed starting of cloned algs
comment:23 Changed 7 years ago by abeham
comment:24 Changed 7 years ago by jkarder
r15204: worked on execution of cross-validation
comment:25 Changed 7 years ago by mkommend
Tested new changes in CV and still encountered some problems. Frenetically clicking the execution buttons, starts/pauses/stops the CV multiple times which results in strange behavior and brings the GUI out of sync with the content.
Handling of exceptions works fine in my opinion.
The branch has to be updated with the most recent trunk changes.
comment:26 Changed 7 years ago by jkarder
r15212: worked on execution of cross-validation
comment:27 Changed 7 years ago by jkarder
r15215: worked on execution of basic algorithm
comment:28 Changed 7 years ago by jkarder
r15216: reset startPending if an exception is thrown before OnStarted is called
comment:29 Changed 7 years ago by jkarder
r15232: worked on exception handling
comment:30 Changed 7 years ago by abeham
r15280: merged r13329:14000 from trunk into branch
comment:31 Changed 7 years ago by abeham
r15281: merged r14001:15280 from trunk into branch
comment:32 Changed 7 years ago by jkarder
r15284: worked on basic algorithm and cross-validation
comment:33 Changed 7 years ago by abeham
- Owner changed from abeham to jkarder
- Status changed from reviewing to assigned
I reviewed the changes and tested this in the GUI extensively. Please merge this into the trunk.
comment:34 Changed 7 years ago by jkarder
r15286: updated mergeinfo
comment:35 Changed 7 years ago by jkarder
- Owner changed from jkarder to abeham
- Status changed from assigned to reviewing
r15287: merged Async branch into trunk
comment:36 Changed 7 years ago by jkarder
comment:37 Changed 7 years ago by abeham
- Owner changed from abeham to jkarder
- Status changed from reviewing to readytorelease
The unit tests ran through, the changes were already extensively tested in the branch. I have no further comments.
comment:38 Changed 7 years ago by jkarder
comment:39 Changed 7 years ago by jkarder
- Resolution set to done
- Status changed from readytorelease to closed
r15293: deleted branch Async
I think we should make this change after switching to .NET4.5 and then add a StartAsync Method which adhears to the TAP. We could maybe then even return Task<ResultCollection>?