News for hackers. Stuff that matters.
Re:Testable IO in Haskell by pron on Sunday June 21, 2015 @02:31PM (#9754438)
That's true -- out of the box. As with all things JVM, this, too is very pliable. You can create a new permission -- "access clock" -- and then it is quite easy to use an agent to inject a call for the security manager to check for this permission whenever the clock is accessed.

In fact, since we started this discussion, I've written a small library that uses an agent to fake all clock accesses on the JVM with a user-supplied virtual clock, that can be set globally or per-thread. Injecting s security check is even easier.

There are no comments on this comment yet.