Corrected threads names

This commit is contained in:
2015-02-06 03:26:19 +00:00
parent 91ddb08d30
commit a13f49eda3

View File

@@ -223,87 +223,59 @@ namespace SharpHash
// Initialize a thread per algorithm // Initialize a thread per algorithm
// TODO: Is there a way to reuse the threads? Start() fails if called more than one time // TODO: Is there a way to reuse the threads? Start() fails if called more than one time
tCRC16 = new Thread(delegate() { tCRC16 = new Thread(() => crc16Context.Update(dataBuffer));
crc16Context.Update(dataBuffer);
});
tCRC16.IsBackground = true; tCRC16.IsBackground = true;
tCRC16.Name = "CRC16"; tCRC16.Name = "CRC16";
tCRC32 = new Thread(delegate() { tCRC32 = new Thread(() => crc32Context.Update(dataBuffer));
crc32Context.Update(dataBuffer);
});
tCRC32.IsBackground = true; tCRC32.IsBackground = true;
tCRC32.Name = "CRC32"; tCRC32.Name = "CRC32";
tCRC64 = new Thread(delegate() { tCRC64 = new Thread(() => crc64Context.Update(dataBuffer));
crc64Context.Update(dataBuffer);
});
tCRC64.IsBackground = true; tCRC64.IsBackground = true;
tCRC64.Name = "CRC64"; tCRC64.Name = "CRC64";
tFletcher16 = new Thread(delegate() { tFletcher16 = new Thread(() => fletcher16Context.Update(dataBuffer));
fletcher16Context.Update(dataBuffer);
});
tFletcher16.IsBackground = true; tFletcher16.IsBackground = true;
tFletcher16.Name = "Fletcher-16"; tFletcher16.Name = "Fletcher-16";
tFletcher32 = new Thread(delegate() { tFletcher32 = new Thread(() => fletcher32Context.Update(dataBuffer));
fletcher32Context.Update(dataBuffer);
});
tFletcher32.IsBackground = true; tFletcher32.IsBackground = true;
tFletcher32.Name = "Fletcher-32"; tFletcher32.Name = "Fletcher-32";
tAdler32 = new Thread(delegate() { tAdler32 = new Thread(() => adler32Context.Update(dataBuffer));
adler32Context.Update(dataBuffer);
});
tAdler32.IsBackground = true; tAdler32.IsBackground = true;
tAdler32.Name = "Adler-32"; tAdler32.Name = "Adler-32";
tMD5 = new Thread(delegate() { tMD5 = new Thread(() => md5Context.Update(dataBuffer));
md5Context.Update(dataBuffer);
});
tMD5.IsBackground = true; tMD5.IsBackground = true;
tMD5.Name = "MD5"; tMD5.Name = "MD5";
tRIPEMD160 = new Thread(delegate() { tRIPEMD160 = new Thread(() => ripemd160Context.Update(dataBuffer));
ripemd160Context.Update(dataBuffer);
});
tRIPEMD160.IsBackground = true; tRIPEMD160.IsBackground = true;
tRIPEMD160.Name = "RIPEMD160"; tRIPEMD160.Name = "RIPEMD160";
tSHA1 = new Thread(delegate() { tSHA1 = new Thread(() => sha1Context.Update(dataBuffer));
sha1Context.Update(dataBuffer);
});
tSHA1.IsBackground = true; tSHA1.IsBackground = true;
tSHA1.Name = "SHA1"; tSHA1.Name = "SHA1";
tSHA256 = new Thread(delegate() { tSHA256 = new Thread(() => sha256Context.Update(dataBuffer));
sha256Context.Update(dataBuffer);
});
tSHA256.IsBackground = true; tSHA256.IsBackground = true;
tSHA256.Name = "SHA256"; tSHA256.Name = "SHA256";
tSHA384 = new Thread(delegate() { tSHA384 = new Thread(() => sha384Context.Update(dataBuffer));
sha384Context.Update(dataBuffer);
});
tSHA384.IsBackground = true; tSHA384.IsBackground = true;
tSHA384.Name = "SHA384"; tSHA384.Name = "SHA384";
tSHA512 = new Thread(delegate() { tSHA512 = new Thread(() => sha512Context.Update(dataBuffer));
sha512Context.Update(dataBuffer);
});
tSHA512.IsBackground = true; tSHA512.IsBackground = true;
tSHA512.Name = "SHA512"; tSHA512.Name = "SHA512";
tSHA3 = new Thread(delegate() { tSHA3 = new Thread(() => sha3Context.Update(dataBuffer));
sha3Context.Update(dataBuffer);
});
tSHA3.IsBackground = true; tSHA3.IsBackground = true;
tSHA3.Name = "SHA3"; tSHA3.Name = "SHA3";
tSpamSum = new Thread(delegate() { tSpamSum = new Thread(() => spamsumContext.Update(dataBuffer));
spamsumContext.Update(dataBuffer);
});
tSpamSum.IsBackground = true; tSpamSum.IsBackground = true;
tSpamSum.Name = "SpamSum"; tSpamSum.Name = "SpamSum";
@@ -335,87 +307,59 @@ namespace SharpHash
// Initialize a thread per algorithm // Initialize a thread per algorithm
// TODO: Is there a way to reuse the threads? Start() fails if called more than one time // TODO: Is there a way to reuse the threads? Start() fails if called more than one time
tCRC16 = new Thread(delegate() { tCRC16 = new Thread(() => crc16Context.Update(dataBuffer));
crc16Context.Update(dataBuffer);
});
tCRC16.IsBackground = true; tCRC16.IsBackground = true;
tCRC16.Name = "CRC16"; tCRC16.Name = "CRC16";
tCRC32 = new Thread(delegate() { tCRC32 = new Thread(() => crc32Context.Update(dataBuffer));
crc32Context.Update(dataBuffer);
});
tCRC32.IsBackground = true; tCRC32.IsBackground = true;
tCRC32.Name = "CRC32"; tCRC32.Name = "CRC32";
tCRC64 = new Thread(delegate() { tCRC64 = new Thread(() => crc64Context.Update(dataBuffer));
crc64Context.Update(dataBuffer);
});
tCRC64.IsBackground = true; tCRC64.IsBackground = true;
tCRC64.Name = "CRC64"; tCRC64.Name = "CRC64";
tFletcher16 = new Thread(delegate() { tFletcher16 = new Thread(() => fletcher16Context.Update(dataBuffer));
fletcher16Context.Update(dataBuffer);
});
tFletcher16.IsBackground = true; tFletcher16.IsBackground = true;
tFletcher16.Name = "Fletcher-16"; tFletcher16.Name = "Fletcher-16";
tFletcher32 = new Thread(delegate() { tFletcher32 = new Thread(() => fletcher32Context.Update(dataBuffer));
fletcher32Context.Update(dataBuffer);
});
tFletcher32.IsBackground = true; tFletcher32.IsBackground = true;
tFletcher32.Name = "Fletcher-32"; tFletcher32.Name = "Fletcher-32";
tAdler32 = new Thread(delegate() { tAdler32 = new Thread(() => adler32Context.Update(dataBuffer));
adler32Context.Update(dataBuffer);
});
tAdler32.IsBackground = true; tAdler32.IsBackground = true;
tAdler32.Name = "Adler-32"; tAdler32.Name = "Adler-32";
tMD5 = new Thread(delegate() { tMD5 = new Thread(() => md5Context.Update(dataBuffer));
md5Context.Update(dataBuffer);
});
tMD5.IsBackground = true; tMD5.IsBackground = true;
tMD5.Name = "MD5"; tMD5.Name = "MD5";
tRIPEMD160 = new Thread(delegate() { tRIPEMD160 = new Thread(() => ripemd160Context.Update(dataBuffer));
ripemd160Context.Update(dataBuffer);
});
tRIPEMD160.IsBackground = true; tRIPEMD160.IsBackground = true;
tRIPEMD160.Name = "RIPEMD160"; tRIPEMD160.Name = "RIPEMD160";
tSHA1 = new Thread(delegate() { tSHA1 = new Thread(() => sha1Context.Update(dataBuffer));
sha1Context.Update(dataBuffer);
});
tSHA1.IsBackground = true; tSHA1.IsBackground = true;
tSHA1.Name = "SHA1"; tSHA1.Name = "SHA1";
tSHA256 = new Thread(delegate() { tSHA256 = new Thread(() => sha256Context.Update(dataBuffer));
sha256Context.Update(dataBuffer);
});
tSHA256.IsBackground = true; tSHA256.IsBackground = true;
tSHA256.Name = "SHA256"; tSHA256.Name = "SHA256";
tSHA384 = new Thread(delegate() { tSHA384 = new Thread(() => sha384Context.Update(dataBuffer));
sha384Context.Update(dataBuffer);
});
tSHA384.IsBackground = true; tSHA384.IsBackground = true;
tSHA384.Name = "SHA384"; tSHA384.Name = "SHA384";
tSHA512 = new Thread(delegate() { tSHA512 = new Thread(() => sha512Context.Update(dataBuffer));
sha512Context.Update(dataBuffer);
});
tSHA512.IsBackground = true; tSHA512.IsBackground = true;
tSHA512.Name = "SHA512"; tSHA512.Name = "SHA512";
tSHA3 = new Thread(delegate() { tSHA3 = new Thread(() => sha3Context.Update(dataBuffer));
sha3Context.Update(dataBuffer);
});
tSHA3.IsBackground = true; tSHA3.IsBackground = true;
tSHA3.Name = "SHA3"; tSHA3.Name = "SHA3";
tSpamSum = new Thread(delegate() { tSpamSum = new Thread(() => spamsumContext.Update(dataBuffer));
spamsumContext.Update(dataBuffer);
});
tSpamSum.IsBackground = true; tSpamSum.IsBackground = true;
tSpamSum.Name = "SpamSum"; tSpamSum.Name = "SpamSum";
@@ -450,87 +394,59 @@ namespace SharpHash
// Initialize a thread per algorithm // Initialize a thread per algorithm
// TODO: Is there a way to reuse the threads? Start() fails if called more than one time // TODO: Is there a way to reuse the threads? Start() fails if called more than one time
tCRC16 = new Thread(delegate() { tCRC16 = new Thread(() => crc16Context.Update(dataBuffer));
crc16Context.Update(dataBuffer);
});
tCRC16.IsBackground = true; tCRC16.IsBackground = true;
tCRC16.Name = "CRC16"; tCRC16.Name = "CRC16";
tCRC32 = new Thread(delegate() { tCRC32 = new Thread(() => crc32Context.Update(dataBuffer));
crc32Context.Update(dataBuffer);
});
tCRC32.IsBackground = true; tCRC32.IsBackground = true;
tCRC32.Name = "CRC32"; tCRC32.Name = "CRC32";
tCRC64 = new Thread(delegate() { tCRC64 = new Thread(() => crc64Context.Update(dataBuffer));
crc64Context.Update(dataBuffer);
});
tCRC64.IsBackground = true; tCRC64.IsBackground = true;
tCRC64.Name = "CRC64"; tCRC64.Name = "CRC64";
tFletcher16 = new Thread(delegate() { tFletcher16 = new Thread(() => fletcher16Context.Update(dataBuffer));
fletcher16Context.Update(dataBuffer);
});
tFletcher16.IsBackground = true; tFletcher16.IsBackground = true;
tFletcher16.Name = "Fletcher-16"; tFletcher16.Name = "Fletcher-16";
tFletcher32 = new Thread(delegate() { tFletcher32 = new Thread(() => fletcher32Context.Update(dataBuffer));
fletcher32Context.Update(dataBuffer);
});
tFletcher32.IsBackground = true; tFletcher32.IsBackground = true;
tFletcher32.Name = "Fletcher-32"; tFletcher32.Name = "Fletcher-32";
tAdler32 = new Thread(delegate() { tAdler32 = new Thread(() => adler32Context.Update(dataBuffer));
adler32Context.Update(dataBuffer);
});
tAdler32.IsBackground = true; tAdler32.IsBackground = true;
tAdler32.Name = "Adler-32"; tAdler32.Name = "Adler-32";
tMD5 = new Thread(delegate() { tMD5 = new Thread(() => md5Context.Update(dataBuffer));
md5Context.Update(dataBuffer);
});
tMD5.IsBackground = true; tMD5.IsBackground = true;
tMD5.Name = "MD5"; tMD5.Name = "MD5";
tRIPEMD160 = new Thread(delegate() { tRIPEMD160 = new Thread(() => ripemd160Context.Update(dataBuffer));
ripemd160Context.Update(dataBuffer);
});
tRIPEMD160.IsBackground = true; tRIPEMD160.IsBackground = true;
tRIPEMD160.Name = "RIPEMD160"; tRIPEMD160.Name = "RIPEMD160";
tSHA1 = new Thread(delegate() { tSHA1 = new Thread(() => sha1Context.Update(dataBuffer));
sha1Context.Update(dataBuffer);
});
tSHA1.IsBackground = true; tSHA1.IsBackground = true;
tSHA1.Name = "SHA1"; tSHA1.Name = "SHA1";
tSHA256 = new Thread(delegate() { tSHA256 = new Thread(() => sha256Context.Update(dataBuffer));
sha256Context.Update(dataBuffer);
});
tSHA256.IsBackground = true; tSHA256.IsBackground = true;
tSHA256.Name = "SHA256"; tSHA256.Name = "SHA256";
tSHA384 = new Thread(delegate() { tSHA384 = new Thread(() => sha384Context.Update(dataBuffer));
sha384Context.Update(dataBuffer);
});
tSHA384.IsBackground = true; tSHA384.IsBackground = true;
tSHA384.Name = "SHA384"; tSHA384.Name = "SHA384";
tSHA512 = new Thread(delegate() { tSHA512 = new Thread(() => sha512Context.Update(dataBuffer));
sha512Context.Update(dataBuffer);
});
tSHA512.IsBackground = true; tSHA512.IsBackground = true;
tSHA512.Name = "SHA512"; tSHA512.Name = "SHA512";
tSHA3 = new Thread(delegate() { tSHA3 = new Thread(() => sha3Context.Update(dataBuffer));
sha3Context.Update(dataBuffer);
});
tSHA3.IsBackground = true; tSHA3.IsBackground = true;
tSHA3.Name = "SHA3"; tSHA3.Name = "SHA3";
tSpamSum = new Thread(delegate() { tSpamSum = new Thread(() => spamsumContext.Update(dataBuffer));
spamsumContext.Update(dataBuffer);
});
tSpamSum.IsBackground = true; tSpamSum.IsBackground = true;
tSpamSum.Name = "SpamSum"; tSpamSum.Name = "SpamSum";