mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +01:00
add assert to catch case where exception may otherwise be thrown
This commit is contained in:
parent
57dcbabab6
commit
baee084a90
1 changed files with 3 additions and 2 deletions
|
@ -32,7 +32,7 @@ public class GameLock {
|
|||
private static final boolean THROW_ON_LOCKED = true;
|
||||
private static final int SLEEP_TIME = 100;
|
||||
private static final long ASSERT_TIME = 2000;
|
||||
private static final long THROW_TIME = 750;
|
||||
private static final long THROW_TIME = 1000;
|
||||
private long m_rowid;
|
||||
private boolean m_isForWrite;
|
||||
private int m_lockCount;
|
||||
|
@ -115,7 +115,8 @@ public class GameLock {
|
|||
public GameLock lock( long maxMillis )
|
||||
{
|
||||
GameLock result = null;
|
||||
Assert.assertTrue( maxMillis < ASSERT_TIME );
|
||||
Assert.assertTrue( maxMillis <= ASSERT_TIME );
|
||||
Assert.assertTrue( maxMillis <= THROW_TIME );
|
||||
long sleptTime = 0;
|
||||
|
||||
if ( DEBUG_LOCKS ) {
|
||||
|
|
Loading…
Reference in a new issue