Created
June 29, 2015 18:01
-
-
Save pablomatiasgomez/33d18b9cde2027f95e26 to your computer and use it in GitHub Desktop.
How to get a deadlock in three simple lines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int connections_node_getActiveConnectedCount() { | |
pthread_mutex_lock(&activeNodesLock); | |
return dictionary_size(activeNodesSockets); | |
pthread_mutex_unlock(&activeNodesLock); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment