| Summary: | EDC heavily relies on synchronous logic | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | John Cortell <john.cortell> | ||||||||||||||||||||||||
| Component: | cdt-debug-edc | Assignee: | Ken Ryall <ken.ryall> | ||||||||||||||||||||||||
| Status: | RESOLVED WONTFIX | QA Contact: | Ken Ryall <ken.ryall> | ||||||||||||||||||||||||
| Severity: | normal | ||||||||||||||||||||||||||
| Priority: | P3 | CC: | cdtdoug, dalexiev, pawel.1.piech | ||||||||||||||||||||||||
| Version: | 8.0 | Flags: | john.cortell:
review?
(ken.ryall) |
||||||||||||||||||||||||
| Target Milestone: | 8.0 | ||||||||||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||||||||||
| OS: | Windows XP | ||||||||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||||
EDC heavily makes use of synchronous wrappers to TCF services. This was done for convenience as the alternative has significant challenges. Asynchronous APIs are difficult to work with when (a) an async top level operation requires many async sub-operations blended into a lot of logic (b) an async operation is needed deep in the logic of a large operation that is otherwise sync in nature. (a) is for the most part avoided in DSF-GDB since gdb has many commands that map nicely to DSF services. However, when implementing DSF services using low-level TCF services, implementing those service becomes very challenging. EDC currently avoids this difficulty by using utility methods that provide a sync front end to what would otherwise be an async operation. The implementations of these utilities basically tie up the DSF executor thread waiting for an underlying TCF async operation to complete. Ken and I have discussed this and agree that this needs to be cleaned up. One likely tool in this cleanup will be ACMP. This is a programming pattern that allows async gathering of information (a transaction) to be coded in a sync fashion. The transaction itself is asynchronous and none of the data points it gathers are actually obtained synchronously from their source. ACMP is basically a way to avoid having to write chunks of logic using explicit callbacks/RMs. It has other advantages as well. Additionally, because of the need to sit-n-wait on asynchronous calls, EDC currently has to avoid using DSF services to implement DSF services. The reason is that code running on the DSF thread cannot make an asynch DSF request and wait for the result, for obvious reasons (the second request has no chance to run, since it requires the DSF thread, thus resulting in a deadlock). By removing the use of synchronous wrappers to TCF services, EDC will be able to use the DSF variants of those services instead of TCF ones, allowing the bridge between DSF and TCF to be streamlined.