This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.ClassCastException: kotlinx.coroutines.experimental.channels.ProducerCoroutine cannot be cast to kotlinx.coroutines.experimental.selects.SelectClause1 | |
at groostav.kotlinx.exec.CoroutineTests$when using select in producer to merge channels should operate normally$1$merged$1.doResume(CoroutineTests.kt:40) | |
at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:42) | |
at kotlinx.coroutines.experimental.DispatchedTask$DefaultImpls.run(Dispatched.kt:162) | |
at kotlinx.coroutines.experimental.DispatchedContinuation.run(Dispatched.kt:26) | |
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) | |
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) | |
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) | |
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.empowerops.common | |
import kotlinx.coroutines.experimental.* | |
import kotlinx.coroutines.experimental.future.await | |
import java.time.Duration | |
import java.util.concurrent.* | |
import java.util.concurrent.TimeUnit.MILLISECONDS | |
import java.util.concurrent.TimeUnit.NANOSECONDS | |
import java.util.concurrent.atomic.AtomicLong | |
import java.util.concurrent.atomic.AtomicReference |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'%RunPerInstance | |
'@ | |
'@ taken without permission from: http://help.autodesk.com/view/MFIA/2016/ENU/?guid=GUID-202AB85B-5E58-47C9-9514-13BFF790A38D | |
'@ | |
'@ DESCRIPTION | |
'@ Split Presssure Time Series Result into Individual Results. | |
'@ Recreate the Pressure Time Series Result | |
'@ | |
'@ SYNTAX | |
'@ ReadingPressureData |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun exitLiteral(ctx: LiteralContext) { | |
exprs.push(when { | |
ctx.FLOAT() != null -> z3.mkReal(ctx.FLOAT().text) | |
ctx.INTEGER() != null -> z3.mkReal(ctx.INTEGER().text) | |
ctx.CONSTANT() != null -> when(ctx.text.toLowerCase()){ | |
//RealExpr(z3, Native.rcfMkPi(z3)) | |
// "pi" -> z3.mkReal(Math.PI.toString()) | |
"pi" -> { | |
val exprCtor = RealExpr::class.constructors.single().apply { isAccessible = true } | |
val nCtxMember = Context::class.members.single { it.name == "nCtx" }.apply { isAccessible = true } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"C:\Program Files (x86)\Java\jdk1.8.0_121\bin\java" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:56810,suspend=y,server=n -Djava.library.path=C:\Users\Geoff\Code\OASIS\lib\production -ea -Xmx1G -Dcom.empowerops.common.LoggingService.Bootstrapper.DefaultLevel=INFO -Djava.util.logging.FileHandler.pattern=C:/Users/Geoff/Desktop/testing.log -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\deploy.jar;C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\ext\access-bridge-32.jar;C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\ext\cldrdata.jar;C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\ext\dnsns.jar;C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\ext\jaccess.jar;C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\ext\jfxrt.jar;C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\ext\localedata.jar;C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\ext\nashorn.jar;C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\ext\sune |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.empowerops.problem_definition.babel | |
import com.empowerops.problem_definition.parser.BabelParser.* | |
import com.empowerops.problem_definition.parser.BabelParserBaseListener | |
import org.antlr.v4.runtime.CommonToken | |
import org.antlr.v4.runtime.misc.NotNull | |
import org.antlr.v4.runtime.tree.ParseTree | |
import org.antlr.v4.runtime.tree.TerminalNode | |
import org.antlr.v4.runtime.tree.TerminalNodeImpl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test fun `when using thread pool executors should keep threads alive for new jobs`(){ | |
var callCount = 0; | |
val executor = ScheduledThreadPoolExecutor(1).apply { | |
setKeepAliveTime(1, TimeUnit.MILLISECONDS) | |
allowCoreThreadTimeOut(true) | |
} | |
System.gc() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error:Kotlin: [Internal Error] org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: wrong code generated | |
org.jetbrains.kotlin.codegen.CompilationException Back-end (JVM) Internal error: Couldn't transform method node: doResume (Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;: | |
@Lorg/jetbrains/annotations/Nullable;() // invisible | |
@Lorg/jetbrains/annotations/Nullable;() // invisible, parameter 0 | |
@Lorg/jetbrains/annotations/Nullable;() // invisible, parameter 1 | |
L0 | |
ALOAD 0 | |
GETFIELD com/empowerops/jargon/model/PipeSchedulerFixture$FakeUUIDGenerator$Companion$otherUUIDS$1.p$ : Lkotlin/coroutines/experimental/SequenceBuilder; | |
ASTORE 3 | |
L1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ResponseDemultiplexingPipe(val blockingPipe: Pipe) { | |
sealed class IO {} | |
class Read(val id: UUID, response: Channel<MessageDTO>): IO | |
class Write(val id: UUID, response: MessageDTO): IO | |
var map: Map<UUID, Differed<MessageDTO>> = emptyMap() | |
val actor = actor<IO>(CommonPool) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import some.jna | |
import some.dtos | |
import some.other.domainmodels | |
makeEncodingAndConnectingPipe(/* makes a connected pipes using Win32 CreateNamedPipe over JNA */).use { pipe -> | |
pipe.writeMessage(json(StartMessage)) | |
expect<StartAck>(pipe.readMessage()) | |
while(isBusinessLogic()){ |