use assert because CCASSERT is not thread safe