Skip to content

Commit

Permalink
Added Release folders exclusion to .gitignore
Browse files Browse the repository at this point in the history
added some service debug code for future use
  • Loading branch information
alfishe committed Aug 29, 2013
1 parent bac73cc commit bfd81ee
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*.la
*.a
Debug/
Release/
*.opensdf
*.sdf
*.ipch
25 changes: 23 additions & 2 deletions dll/RedisDll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,34 @@ DWORD WINAPI ThreadWorker(LPVOID lpParam)
{
struct timeval tv;

// DEBUG
/*
if (executedasservice())
{
static char message[200];
// Notify calling thread immediately to prevent SCM timeout
SetEvent(hStartedEvent);
// Make a delay to attach debugger
for (int i = 30; i >= 0; i--)
{
sprintf_s(message, "Service functionality will be resumed in... %02d secs\n", i);
OutputDebugString(message);
Sleep(1000);
}
}
*/
// END OF DEBUG

// We need to initialize our libraries, and the server configuration.
zmalloc_enable_thread_safeness();
zmalloc_set_oom_handler(redisOutOfMemoryHandler);
srand((unsigned int)time(NULL) ^ getpid());
gettimeofday(&tv,NULL);
gettimeofday(&tv, NULL);

dictSetHashFunctionSeed(tv.tv_sec^tv.tv_usec^getpid());
dictSetHashFunctionSeed(tv.tv_sec ^ tv.tv_usec ^ getpid());

// TODO: Allow to use sentinel mode
server.sentinel_mode = 0; // checkForSentinelMode(0, NULL);
Expand Down

0 comments on commit bfd81ee

Please sign in to comment.