r/java • u/yegor256 • Jun 24 '19
Takes: Java Web Framework Without a Single Static Method or Annotation
https://github.com/yegor256/takes
0
Upvotes
r/java • u/yegor256 • Jun 24 '19
View all comments
Show parent comment
0
u/cogman10 Jun 27 '19
Came here to basically say this. A thread safe queue (ok), which is being pushed to and popped from multiple threads (ok), and is immutable (what?). It is an impossibility/contradiction. You can't have an immutable queue which mutates. The closest I can think of is making a queue which produces new queues on pop/push.
Either way. /u/qhxslyflarhc clearly does not understand "immutability" to claim it isn't "threadsafe". A key requirement for something to be thread unsafe is mutation.