Skip to content

Commit

Permalink
iox-#615 extend C API with the runtime shutdown method
Browse files Browse the repository at this point in the history
Signed-off-by: Mathias Kraus <mathias.kraus@apex.ai>
  • Loading branch information
elBoberido committed Apr 12, 2021
1 parent eb9c97b commit 4bb9cbe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions iceoryx_binding_c/include/iceoryx_binding_c/runtime.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,4 +33,8 @@ void iox_runtime_init(const char* const name);
/// If name is a nullptr, 0 will be returned.
uint64_t iox_runtime_get_instance_name(char* const name, const uint64_t nameLength);

/// @brief initiates the shutdown of the runtime to unblock all potentially blocking publisher
/// with the iox_SubscriberTooSlowPolicy::SubscriberTooSlowPolicy_WAIT_FOR_SUBSCRIBER option set
void iox_runtime_shutdown();

#endif
5 changes: 5 additions & 0 deletions iceoryx_binding_c/source/c_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,8 @@ uint64_t iox_runtime_get_instance_name(char* const name, const uint64_t nameLeng

return instanceName.size();
}

void iox_runtime_shutdown()
{
PoshRuntime::getInstance().shutdown();
}

0 comments on commit 4bb9cbe

Please sign in to comment.