-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Describe the feature
In Go a select()
statement that uses the same synchronous channel in a single thread will fail on the deadlock. In Scala channels implemented in this project, the code won't block, and also the send will transfer the value, but the receiver won't be triggered until another such call.
Here is an example:
val channel = Channel.make[Int]
select(
channel.recver(n => {
println(s"Received $n")
}),
channel.sender(10) {
println("Sent 10")
}
)
Scala code will print "Sent 10", GoLang equivalent code will fail on deadlock.
Since Scala does not have deadlock checkers, it should just deadlock in this case.
Metadata
Metadata
Assignees
Labels
No labels