Do not require freezing for Worker.executeAfter on experimental MM
This commit is contained in:
committed by
Space
parent
16e9c74523
commit
cc71069a3a
@@ -43,9 +43,15 @@ fun withLock(op: () -> Unit) {
|
||||
|
||||
@Test fun runTest3() {
|
||||
val worker = Worker.start()
|
||||
assertFailsWith<IllegalStateException> {
|
||||
if (Platform.memoryModel == MemoryModel.EXPERIMENTAL) {
|
||||
worker.executeAfter {
|
||||
println("shall not happen")
|
||||
println("unfrozen OK")
|
||||
}
|
||||
} else {
|
||||
assertFailsWith<IllegalStateException> {
|
||||
worker.executeAfter {
|
||||
println("shall not happen")
|
||||
}
|
||||
}
|
||||
}
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
@@ -81,4 +87,4 @@ fun makeCyclic(): Node {
|
||||
}
|
||||
assert(future.result != null)
|
||||
worker.requestTermination().result
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user