Comments (2)
While technically this is an issue, Java 8 streams don’t support this kind of operation, and it’s doubtful they will. Streams are meant for data transformation operations that don’t block. In general, blocking inside streams (even without fibers) is a bad thing to do, as you’re not guaranteed which thread you’re blocking, and may accidentally block a global thread pool and prevent other stream operations from running. For non-parallel streams, this is usually not an issue (as the stream operations are run on the current thread), but I don’t think this behavior is guaranteed. Finally, stream operations are never supposed to have side effects, and creating a fiber (or a thread, or a task) is a side effect.
For a similar concept for concurrency rather than parallelism, use Quasar channels. Also, there is a utility method that lets you wait on multiple fibers.
from quasar.
Fair enough. I guess I should take more care when abusing new shiny toys. Thanks for the explanation!
from quasar.
Related Issues (20)
- Class files published to maven are version 54, even though they should probably be 52 (breaks Graal) HOT 2
- MethodDatabase.isProblematicClass throw NPE HOT 2
- Fails to instrument Vert.x project HOT 1
- Problem integrating fiber wtih Apache Camel
- Groovy support for FiberAsync HOT 1
- Creating 2 FiberScheduler with MonitorType.METRICS cause "A metric named runawayFibers already exists"
- Warning: scheduler: FiberForkJoinScheduler is blocking a thread HOT 1
- Fails to instrument java.io.InputStream.read(byte[],int,int) HOT 1
- system start java.lang.NoClassDefFoundError: com/esotericsoftware/kryo/Serializer HOT 3
- Has the project been abandoned? HOT 2
- WARNING: co.paralleluniverse.fibers.FiberForkJoinScheduler@4446cced] is blocking a thread HOT 2
- JDK 14 Support HOT 2
- why do I call the constructor multiple times when I use sleep in another thread HOT 1
- how to park multiple times in a fuction at different place ?
- Can i use Future.get() in Fiber task?
- Version 0.8.0 fails to instrument Java 11 classes
- do you forget something in co.paralleluniverse.common.util.UtilUnsafe class?
- FATAL ERROR in native method: processing of -javaagent failed?
- Provide functional style API? HOT 1
- Is this still be maintained? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quasar.