Created
June 25, 2014 02:50
-
-
Save pbalduino/2a0b4b39173943bb7fd7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (def trans (transient [])) | |
| (conj! trans "Main thread") | |
| (defn outra-thread [] | |
| (conj! trans "New thread")) | |
| (. (Thread. outra-thread) start) | |
| ; Exception in thread "Thread-21" java.lang.IllegalAccessError: Transient used by non-owner thread | |
| ; at clojure.lang.PersistentVector$TransientVector.ensureEditable(PersistentVector.java:464) | |
| ; at clojure.lang.PersistentVector$TransientVector.conj(PersistentVector.java:495) | |
| ; at clojure.lang.PersistentVector$TransientVector.conj(PersistentVector.java:431)nil | |
| ; at clojure.core$conj_BANG_.invoke(core.clj:3077) | |
| ; at user$outra_thread.invoke(NO_SOURCE_FILE:2) | |
| ; at clojure.lang.AFn.run(AFn.java:22) | |
| ; at java.lang.Thread.run(Unknown Source) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment