New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google App Engine Support for Future #8362
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8362?orig=1 |
@adriaanm said (edited on Mar 6, 2014 7:17:02 PM UTC): [EDIT: please ignore the rest of this comment -- it was more of a stream of consciousness than anything else] My un-educated guess is that this is because we ship with our own copy of the fork join implementation, since we target Java 6. It looks like GAE requires using the one that comes with the/their jdk. I'll ask around for a work around. Could you try this suggestion from SO? http://stackoverflow.com/a/20627692/276895 Specifically, create an execution context that uses the jdk's fork join. It would be better if this just worked, though. implicit val execCtx = scala.concurrent.ExecutionContext fromExecutorService new java.util.concurrent.ForkJoinPool Sorry, I see you're already doing this. Missed that line… -- Looks like my diagnosis was wrong again, it's another use of Unsafe in AbstractPromise, as you say in the title. I'll go have some more coffee now and leave it to the experts. |
@adriaanm said (edited on Mar 6, 2014 9:47:28 PM UTC): |
Carey Evans (carey) said:
Presumably the current code is a micro-optimisation that makes a noticeable difference even after Hotspot has inlined all the method calls. It would be nice if Scala could fall back to the standard Java API instead of raising |
Carey Evans (carey) said: |
@gkossakowski said: |
@retronym said: |
@adriaanm said: |
@SethTisue said: |
Bart Jenkins (bauhaus9) said: |
When I try to use Scala's
scala.concurrent.Future
on Google App Engine, it fails because access tosun.misc.Unsafe
is blocked by App Engine's security manager. This is reproducible using the App Engine Java SDK without uploading anything to Google, or needing a Google account:The basic code I'm using to reproduce this is below, my actual code was somewhat more complicated and involved blocking HTTP access in my threads:
The text was updated successfully, but these errors were encountered: