-
-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
78 additions
and
22 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
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,40 @@ | ||
// Copyright (c) 2023 STE||AR Group | ||
// | ||
// SPDX-License-Identifier: BSL-1.0 | ||
// Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <hpx/init.hpp> | ||
#include <hpx/modules/testing.hpp> | ||
|
||
int hpx_main() | ||
{ | ||
return hpx::local::finalize(); | ||
} | ||
|
||
bool called_on_finalize = false; | ||
|
||
void finalize_callback() | ||
{ | ||
called_on_finalize = true; | ||
} | ||
|
||
struct set_finalizer | ||
{ | ||
set_finalizer() | ||
{ | ||
hpx::on_finalize = &finalize_callback; | ||
} | ||
}; | ||
|
||
set_finalizer init; | ||
|
||
int main(int argc, char** argv) | ||
{ | ||
HPX_TEST_EQ(hpx::local::init(hpx_main, argc, argv), 0); | ||
|
||
// on_finalize should have been called at this point | ||
HPX_TEST(called_on_finalize); | ||
|
||
return hpx::util::report_errors(); | ||
} |
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