Skip to content

Instantly share code, notes, and snippets.

View cramja's full-sized avatar
💯

Marc S cramja

💯
View GitHub Profile
@cramja
cramja / TestConcurrency.cpp
Created April 25, 2016 19:29
A snippet to show how to test the StorageManager interface using concurrency and brute-force. An even better test would be to automatically detect deadlock.
namespace storage_manager_test_internal {
static int client_id = 0;
static const int NUM_BLOBS_PER_CLIENT = 100;
static const int BLOB_SIZE_SLOTS = 1;
static const int CLIENT_CYCLES = 1000;
class StorageClient : public Thread {
public: