Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Stream that can be read and write (thread safe)?  RSS feed

Milan Tomic
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a (Netty or JDK8 or ThirdParty) stream (or whatever its name should be) that can be both read and write and it is thread safe (only read or only write at the same time)? It should have both read(ByteBuf) and write(ByteBuf) or both read(byte[])) and write(byte[]))?

I have scenario where multiple components should process a stream. For performance reasons those components run in their own threads and read some amount of bytes to be processed.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!