-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unlink shutdown callback from ref count (#1166)
Co-authored-by: Bret Ambrose <bambrose@amazon.com>
- Loading branch information
1 parent
bb29dc8
commit 257c9ec
Showing
2 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#ifndef AWS_COMMON_SHUTDOWN_TYPES_H | ||
#define AWS_COMMON_SHUTDOWN_TYPES_H | ||
|
||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
#include <aws/common/common.h> | ||
|
||
AWS_PUSH_SANE_WARNING_LEVEL | ||
|
||
typedef void(aws_simple_completion_callback)(void *); | ||
|
||
/** | ||
* Configuration for a callback to invoke when something has been completely | ||
* cleaned up. Primarily used in async cleanup control flows. | ||
*/ | ||
struct aws_shutdown_callback_options { | ||
|
||
/** | ||
* Function to invoke when the associated object is fully destroyed. | ||
*/ | ||
aws_simple_completion_callback *shutdown_callback_fn; | ||
|
||
/** | ||
* User data to invoke the shutdown callback with. | ||
*/ | ||
void *shutdown_callback_user_data; | ||
}; | ||
|
||
AWS_POP_SANE_WARNING_LEVEL | ||
|
||
#endif /* AWS_COMMON_SHUTDOWN_TYPES_H */ |