Does anyone know how to get number of thread?

I am having problem with solving ‘Assertion failed: Result && “Increase NUM_ELEMENTS_IN_POOL” issue.’ Which defined by NUM_ELEMENTS_IN_POOL = 128

I wonder when thread actually exceed 128. but I have no idea how to get number of thread.

Please let me know if these function is exist.