Use a raw function pointer instead of std::function objects in thread pool.

std::function can have an allocation cost when it's created, and also adds overhead to function calls. Since this API must be used from C, using a raw function pointer is good enough.
PiperOrigin-RevId: 562760324
Change-Id: I2b714a13e07a2b71566d013f21f76c506e817a52
This commit is contained in:
Nimrod Gileadi
2023-09-05 06:28:58 -07:00
committed by Copybara-Service
parent edbe9ce86f
commit f976d6d228
6 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ extern "C" {
// These types are implemented in C++, they're just used as opaque pointers in C
// to provide type safety for functions.
struct mjTask_ {
char buffer[48];
char buffer[24];
};
typedef struct mjTask_ mjTask;