locking macro broken ?

3 views
Skip to first unread message

guillaume faure

unread,
Jun 3, 2008, 3:45:15 PM6/3/08
to clo...@googlegroups.com
Hi all. Today, I had to do some thread synchronization and I ended
willing to play with the locking macro, unfortunately, I can't make it
work. Did I miss something ? Looking at the source of MonitorEnterExpr
I think this might be because this expr can be evaluated, but then how
does it works ?

user=> (locking (new Object))
java.lang.VerifyError: (class: clojure/fns/user/fn__1911, method:
invoke signature: ()Ljava/lang/Object;) Unable to pop operand off an
empty stack
java.lang.VerifyError: (class: clojure/fns/user/fn__1911, method:
invoke signature: ()Ljava/lang/Object;) Unable to pop operand off an
empty stack
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at clojure.lang.Compiler$FnExpr.eval(Compiler.java:2910)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:2556)
at clojure.lang.Compiler.eval(Compiler.java:3719)
at clojure.lang.Repl.main(Repl.java:75)

Thanks.

Guillaume.

Rich Hickey

unread,
Jun 3, 2008, 5:26:28 PM6/3/08
to Clojure


On Jun 3, 3:45 pm, "guillaume faure" <kyok...@gmail.com> wrote:
> Hi all. Today, I had to do some thread synchronization and I ended
> willing to play with the locking macro, unfortunately, I can't make it
> work. Did I miss something ? Looking at the source of MonitorEnterExpr
> I think this might be because this expr can be evaluated, but then how
> does it works ?
>
> user=> (locking (new Object))
> java.lang.VerifyError: (class: clojure/fns/user/fn__1911, method:

Recent regression, fixed - thanks for the report!

Rich

guillaume faure

unread,
Jun 3, 2008, 6:28:43 PM6/3/08
to clo...@googlegroups.com
Thanks a lot Rich as always for the flash fix.

Guillaume.

Reply all
Reply to author
Forward
0 new messages