Commit Graph

4 Commits

Author SHA1 Message Date
Matthew Bennice 8ffdee355a Add new header to correct warning for placement new
PiperOrigin-RevId: 562800238
Change-Id: I94c883488391f7e95347eb2fe8dc291125233fff
2023-09-05 09:20:40 -07:00
Nimrod Gileadi f976d6d228 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
2023-09-05 06:31:05 -07:00
Matthew Bennice edbe9ce86f Correct use of number_of_threads_ in an array length definition. It should be max_number_of_threads to allow Windows to compile it, GCC tolerates the variable length array.
PiperOrigin-RevId: 562743538
Change-Id: I5dc6dfb54002a996fe129b91e599cccfc9420e9c
2023-09-05 05:06:29 -07:00
Matthew Bennice 6225186964 Add threading primitives.
PiperOrigin-RevId: 562649644
Change-Id: I9c35b270e4b3b50cc7eb5a152f24d71def8e2fcd
2023-09-04 20:09:19 -07:00