8000 fixed race condition in FoldSelect · rssh/scala-gopher@e809b54 · GitHub
[go: up one dir, main page]

Skip to content

Commit e809b54

Browse files
committed
fixed race condition in FoldSelect
1 parent 75de6c6 commit e809b54

18 files changed

+372
-183
lines changed

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name:="scala-gopher"
33

44
organization:="com.github.rssh"
55

6-
scalaVersion := "2.12.0"
7-
crossScalaVersions := Seq("2.11.8", "2.12.0")
6+
scalaVersion := "2.12.1"
7+
crossScalaVersions := Seq("2.11.8", "2.12.1")
88

99
resolvers += Resolver.sonatypeRepo("snapshots")
1010

@@ -22,7 +22,7 @@ libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.6"
2222

2323
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.0" % "test"
2424

25-
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.4.12"
25+
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.4.14"
2626

2727
//TODO: enable after 1.0
2828
//libraryDependencies += "com.typesafe.akka" %% "akka-stream-experimental" % "0.9"

notes/0.99.8.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ ie in simplicified explanation:
88
```
99
1.to(n).foreachAsync { async(s += await(aread(x))) }
1010
```
11+
details can be found in techreport: https://arxiv.org/abs/1611.00602
1112
- added support for select.fold construct
1213
- scala 2.12

src/main/scala/gopher/channels/ChannelProcessor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ChannelProcessor(api: GopherAPI) extends Actor
2626
}
2727
}
2828
case cr@ContRead(f,ch, ft) =>
29-
if (!ft.isCompleted) {
29+
if (!ft.isCompleted) {
3030
ch.cbread[cr.R](f,ft)
3131
}
3232
case cw@ContWrite(f,ch, ft) =>

src/main/scala/gopher/channels/Continuated.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ object ContWrite
126126
*/
127127
case class Skip[A](function: Skip[A] => Option[Future[Continuated[A]]], override val flowTermination: FlowTermination[A]) extends FlowContinuated[A]
128128

129+
object Skip
130+
{
131+
type AuxF[A] = Skip[A]=>Option[Future[Continuated[A]]]
132+
}
133+
129134
/**
130135
* never means the end of conversation
131136
*/

src/main/scala/gopher/channels/DuppedInput.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class DuppedInput[A](origin:Input[A])
3737
def api = origin.api
3838
private implicit def ec:ExecutionContext = api.executionContext
3939

40-
private var closed = false
4140

4241

4342
}

0 commit comments

Comments
 (0)
0