Skip to content

Commit 186345a

Browse files
committed
Minor updates
1 parent 07fd791 commit 186345a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

External.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ set(MSGPACK_INCLUDE_DIR "${DELEGATE_ROOT_DIR}/../msgpack-c/include")
1919
# ***** END TARGET BUILD OPTIONS *****
2020

2121
if(NOT EXISTS "${VCPKG_ROOT_DIR}")
22-
#message(FATAL_ERROR "${VCPKG_ROOT_DIR} Directory does not exist. Update VCPKG_ROOT_DIR to the correct directory.")
22+
message(FATAL_ERROR "${VCPKG_ROOT_DIR} Directory does not exist. Update VCPKG_ROOT_DIR to the correct directory.")
2323
endif()
2424

2525
if (NOT EXISTS "${ZMQ_LIB_DIR}/${ZMQ_LIB_NAME}")
26-
#message(FATAL_ERROR "Error: ${ZMQ_LIB_NAME} not found in ${ZMQ_LIB_DIR}. Please ensure the library is available.")
26+
message(FATAL_ERROR "Error: ${ZMQ_LIB_NAME} not found in ${ZMQ_LIB_DIR}. Please ensure the library is available.")
2727
else()
2828
message(STATUS "Found ${ZMQ_LIB_NAME} in ${ZMQ_LIB_DIR}")
2929
endif()
3030

3131
if(NOT EXISTS "${MSGPACK_INCLUDE_DIR}")
32-
#message(FATAL_ERROR "${MSGPACK_INCLUDE_DIR} Directory does not exist. Update MSGPACK_INCLUDE_DIR to the correct directory.")
32+
message(FATAL_ERROR "${MSGPACK_INCLUDE_DIR} Directory does not exist. Update MSGPACK_INCLUDE_DIR to the correct directory.")
3333
endif()
3434

3535

docs/DETAILS.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ The C++ delegates library can invoke any callable function synchronously, asynch
3232
- [Asynchronous Non-Blocking Delegates](#asynchronous-non-blocking-delegates)
3333
- [Asynchronous Blocking Delegates](#asynchronous-blocking-delegates)
3434
- [Remote Delegates](#remote-delegates)
35-
- [Fixed-Block Memory Allocator](#fixed-block-memory-allocator)
3635
- [Error Handling](#error-handling)
36+
- [Fixed-Block Memory Allocator](#fixed-block-memory-allocator)
3737
- [Function Argument Copy](#function-argument-copy)
3838
- [Caution Using `std::bind`](#caution-using-stdbind)
3939
- [Caution Using Raw Object Pointers](#caution-using-raw-object-pointers)
@@ -563,17 +563,18 @@ std::istream& recv_stream;
563563
// Receiver invokes the remote target function
564564
delegateRemote.Invoke(recv_stream);
565565
```
566+
## Error Handling
567+
568+
The delegate library uses dynamic memory to send asynchronous delegate messages to the target thread. By default, out-of-memory failures throw a `std::bad_alloc` exception. Optionally, if `USE_ASSERTS` is defined, exceptions are not thrown, and an assert is triggered instead. See `DelegateOpt.h` for more details.
569+
570+
Remote delegate error handling is captured by registering a callback with `SetErrorHandler()`.
566571

567572
## Fixed-Block Memory Allocator
568573

569574
The delegate library optionally uses a fixed-block memory allocator when `USE_ALLOCATOR` is defined. See `DelegateOpt.h` for more details. The allocator design is available in the [stl_allocator](https://github.com/endurodave/stl_allocator) repository.
570575

571576
`std::function` used within class `DelegateFunction` may use the heap under certain conditions. Implement a custom `xfunction` similar to the `xlist` concept within `xlist.h` using the `xallocator` fixed-block allocator if deemed necessary.
572577

573-
## Error Handling
574-
575-
The delegate library uses dynamic memory to send asynchronous delegate messages to the target thread. By default, out-of-memory failures throw a `std::bad_alloc` exception. Optionally, if `USE_ASSERTS` is defined, exceptions are not thrown, and an assert is triggered instead. See `DelegateOpt.h` for more details.
576-
577578
## Function Argument Copy
578579

579580
The behavior of the delegate library when invoking asynchronous non-blocking delegates (e.g. `DelegateAsyncFree<>`) is to copy arguments into heap memory for safe transport to the destination thread. All arguments (if any) are duplicated. If your data is not plain old data (POD) and cannot be bitwise copied, ensure you implement an appropriate copy constructor to handle the copying.

example/sample-projects/system-architecture/common/CommandMsg.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define COMMAND_MSG_H
33

44
#include <msgpack.hpp>
5-
#include <chrono>
65

76
class CommandMsg
87
{

0 commit comments

Comments
 (0)