Safer blocking calls
This commit is contained in:
parent
cf00451465
commit
b3f1ecf368
|
@ -21,6 +21,7 @@ import dorkbox.network.Server
|
|||
import dorkbox.network.connection.Connection
|
||||
import dorkbox.network.serialization.Serialization
|
||||
import dorkboxTest.network.BaseTest
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.junit.Test
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
|
@ -85,6 +86,8 @@ class RmiDelayedInvocationTest : BaseTest() {
|
|||
|
||||
// sometimes, this method is never called right away.
|
||||
remoteObject.setOther(i.toFloat())
|
||||
|
||||
runBlocking {
|
||||
synchronized(iterateLock) {
|
||||
try {
|
||||
(iterateLock as Object).wait(1)
|
||||
|
@ -95,6 +98,7 @@ class RmiDelayedInvocationTest : BaseTest() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.error("Done with delay invocation test")
|
||||
|
||||
stopEndPoints()
|
||||
|
|
Loading…
Reference in New Issue
Block a user