Giter VIP home page Giter VIP logo

castor's People

Contributors

ckipp01 avatar gitter-badger avatar k0ala avatar lihaoyi avatar lolgab avatar yiksanchan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

castor's Issues

Not able to maintain order of messages

I created a pool actor (basic actor) which internally uses another N basic working actors which do the processing round-robin. After all items to process were sent to the pool, I sent an "end-of-work" marker for each working actor with the assumption that they are handled last (after the last item sent) by the actor. When the end marker was received, the actor would countdown a latch and I can then wait for the pool to be finished with all items when the latch is done for all actors. This did not work as expected - only if I add a delay after the item sending phase (~ 100ms) the "end-of-work" markers are in order. Without the delay, the end-markers got handled before some items and that of course crashed the semantics. Is this intended? What am I missing here?

Scala.js: non-existent class java.util.concurrent.ExecutorService

I'm unable to instantiate a castor Context for Scala.js. My minimal example doesn't even include an actor yet:

package ca.bwbecker

object Main {
  implicit val ac = castor.Context.Simple.global

  def main(args: Array[String]): Unit = {
    println("Hello, world!")
  }
}

The fastOptJS stage throws about half a dozen instances of the following error:

sbt:castorTests> fastOptJS
[info] Fast optimizing /Users/bwbecker/temp/castorTests/target/scala-2.12/castortests-fastopt
[error] Referring to non-existent class java.util.concurrent.ExecutorService
[error]   called from private castor.Context$Simple$.executionContext$lzycompute()scala.concurrent.ExecutionContextExecutorService
[error]   called from castor.Context$Simple$.executionContext()scala.concurrent.ExecutionContextExecutorService
[error]   called from private castor.Context$Simple$.global$lzycompute()castor.Context$Simple
[error]   called from castor.Context$Simple$.global()castor.Context$Simple
[error]   called from constructor ca.bwbecker.Main$.<init>()void
[error]   called from static ca.bwbecker.Main.main([java.lang.String)void
[error]   called from core module module initializers
[error] involving instantiated classes:
[error]   castor.Context$Simple$

This is with SBT. Plugins:

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.0")

Build file:

testFrameworks += new TestFramework("utest.runner.Framework")

lazy val demo = project
  .in(file("."))
  .enablePlugins(ScalaJSPlugin)
  .settings(
    name := "castorTests",
    scalaJSUseMainModuleInitializer := true,
    version := "0.1",
    scalaVersion := "2.12.13",
    libraryDependencies ++= Seq("com.lihaoyi" %%% "utest"  % "0.7.7" % "test",
                                "com.lihaoyi" %%% "castor" % "0.1.7"
    )
  )

Any suggestions?

Also, could you publish against a more recent version of ScalaJS?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.