Port to SDL2
FossilOrigin-Name: 42d4b57828b48b9e38d8be3edcebca4c7cbca9948d8792a320df1f92c13465be
This commit is contained in:
parent
c3cd8d4fac
commit
3a1bbe3110
7 changed files with 52 additions and 84 deletions
|
@ -60,23 +60,25 @@ resolverinit(int threads, int limit)
|
|||
resolverthread &rt = resolverthreads.add();
|
||||
rt.query = NULL;
|
||||
rt.starttime = 0;
|
||||
rt.thread = SDL_CreateThread(resolverloop, &rt);
|
||||
rt.thread =
|
||||
SDL_CreateThread(resolverloop, "resolverthread", &rt);
|
||||
--threads;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
resolverstop(resolverthread &rt, bool restart)
|
||||
{
|
||||
SDL_LockMutex(resolvermutex);
|
||||
SDL_KillThread(rt.thread);
|
||||
// SDL_KillThread(rt.thread);
|
||||
rt.query = NULL;
|
||||
rt.starttime = 0;
|
||||
rt.thread = NULL;
|
||||
if (restart)
|
||||
rt.thread = SDL_CreateThread(resolverloop, &rt);
|
||||
rt.thread =
|
||||
SDL_CreateThread(resolverloop, "resolverthread", &rt);
|
||||
SDL_UnlockMutex(resolvermutex);
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
resolverclear()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue