'tickets' can use 'threads' now

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@706 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2011-01-20 18:37:51 +00:00
parent 3fad25b8c8
commit ab84a5169e
61 changed files with 1928 additions and 980 deletions

View File

@@ -151,7 +151,8 @@ IndexId::iterator i;
if( i == index_id.end() )
{
i = index_id.begin();
WaitForSignalSleep(30);
WaitForSignalSleep(10);
//WaitForSignalSleep(1);
}
else
{
@@ -186,19 +187,24 @@ return outdated;
// it's called from the other thread (with Lock and Unlock)
void SessionContainer::DeleteSession(SessionContainer::IndexId::iterator i)
{
Session * old_session = request->session;
Session * old_session = 0;
Session * del_session = &(*i->second);
request->session = &(*i->second);
if( del_session != request->session )
old_session = request->session;
//log << log3 << "SessionContainer: deleting outdated session, id: " << i->second->id << logend;
request->session = del_session;
if( i->second->puser )
last_container->UserLogout(i->second->puser->id, i->second->id);
log << log4 << "SessionContainer: deleting outdated session, id: " << del_session->id << logend;
if( del_session->puser )
last_container->UserLogout(del_session->puser->id, del_session->id);
table.erase(i->second);
index_id.erase(i);
table_size -= 1;
// !! tu moze byc zero
request->session = old_session;
}