Skip to content

Commit

Permalink
[ESI] Make AcceleratorConnection::disconnect virtual (#7554)
Browse files Browse the repository at this point in the history
Currently, `AcceleratorConnection` implementations only have one "official" teardown entry point, being their destructors. However, this makes implementations susceptible to destructor race conditions, due to the various things that may be concurrently executing in implementation-owned resources.

To provide users with more control during teardown, mark `AcceleratorConnection::disconnect` as virtual, allowing implementations to tear things down before destruction.

Co-authored-by: Morten Borup Petersen <[email protected]>
  • Loading branch information
mortbopet and Morten Borup Petersen authored Aug 26, 2024
1 parent 66122eb commit 5a669df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Dialect/ESI/runtime/cpp/include/esi/Accelerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class AcceleratorConnection {
Context &getCtxt() const { return ctxt; }

/// Disconnect from the accelerator cleanly.
void disconnect();
virtual void disconnect();

/// Request the host side channel ports for a particular instance (identified
/// by the AppID path). For convenience, provide the bundle type.
Expand Down

0 comments on commit 5a669df

Please sign in to comment.