Facade::~Facade() { ::CloseHandle(m_hndl); if (m_delOnClose) { bool ret = fsys::file::del_nt(m_path.c_str()); LogAtten(L"Auto delete on close: '%s' -> %d\n", m_path.c_str(), ret); UNUSED(ret); } }
void test_crypt() { LogAtten(); auto prov = crypt::provider(); auto hash = crypt::hash(prov); for (int i = 0; i < 200 && hash->process(reinterpret_cast<const void*>(&i), sizeof(i)); ++i) { } char hashBuf[64]; hash->get_hash(hashBuf, sizeof(hashBuf)); LogReport("hash: %s", hashBuf); }
bool Scheduler::SchedulerImpl::cancel_task(ITask* task) { LogTraceObj("(%p)", task); auto deleted = del_task(task); if (!deleted && task == currentTask) { LogDebug("we are trying to cancel task already running: %p", task); if (thread::get_id() == thread->get_id()) { LogInfo("cancelling task from itself: %p", task); } else { LogAtten("waiting till task is finished: %p", task); while (task == currentTask) sync::sleep(0); } } LogTraceObj("(%p) -> %d", task, deleted); return deleted; }