digitalmars.D - Consuming shared streams - scratchspace
- Kagamin (3/12) May 14 2012 My idea: http://pastebin.com/c...
On Monday, 14 May 2012 at 14:49:08 UTC, Steven Schveighoffer wrote:The problem is when you create an *extendable* system like the one I'm doing. At that point, you can lock when you cast away shared, but you have no idea whether a method call is going to squirrel away an unshared reference to itself somewhere, so that when you go back to shared (and unlock), there's a leaked thread-local reference somewhere. It may have to require documentation-based restrictions (i.e. not-compiler-enforced). I haven't put enough thought into the possible means to do this. Ideas are welcome!
My idea: http://pastebin.com/cgPgBam5
May 14 2012