bhauman / rebel-readline

Terminal readline library for Clojure dialects
Eclipse Public License 1.0
684 stars 37 forks source link

Running `require` in background can lead to sporadic errors on start #211

Open SevereOverfl0w opened 4 years ago

SevereOverfl0w commented 4 years ago

require is not thread safe, but https://github.com/bhauman/rebel-readline/blob/6c314f8fe1cb44bde3a0511bf14d48157f89f6d7/rebel-readline/src/rebel_readline/utils.clj#L45 starts a thread and calls require.

This can lead to confusing errors if you happen to load rewrite-clj yourself (e.g. in :init) while rebel loads it also.