|
@@ -29,7 +29,7 @@ namespace Yitter.IdGenerator |
|
|
|
|
|
|
|
|
if (options.SeqBitLength + options.WorkerIdBitLength > 22)
|
|
|
if (options.SeqBitLength + options.WorkerIdBitLength > 22)
|
|
|
{
|
|
|
{
|
|
|
throw new ApplicationException("不满足条件:WorkerIdBitLength + SeqBitLength <= 22");
|
|
|
|
|
|
|
|
|
throw new ApplicationException("error:WorkerIdBitLength + SeqBitLength <= 22");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
var maxWorkerIdNumber = Math.Pow(2, options.WorkerIdBitLength) - 1;
|
|
|
var maxWorkerIdNumber = Math.Pow(2, options.WorkerIdBitLength) - 1;
|
|
@@ -72,7 +72,6 @@ namespace Yitter.IdGenerator |
|
|
{
|
|
|
{
|
|
|
Thread.Sleep(500);
|
|
|
Thread.Sleep(500);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|