Gerd Stolpmann a écrit :
Sure, there is not much choice in the toplevel so I guess we could tweak the META file so that #require "postgresql;;" works out of the box. For example, we could just load an additional module that would do "#thread;;" inside a toplevel. I'm not sure this is the idiomatic way, though, nor do I know the guidelines for this.No, the idiomatic way is to signal an error when the library is loaded without having enabled threads beforehand: error(-mt) = "This library requires multi-threading support" (read: if multi-threading is not enabled, fail with this error message) Gerd
This does indeed seem to be the "right" way: if I wish to package some stuff that depends on postgresql, as I'm currently doing, I want to simply make a dependency to postgresql. Whether or not the postgresql library works in a non multithreaded environment should not be my worry, but only the worry of the person who packages postgresql. Raising such an error is indeed a good way: if postgresql comes to work in a non-multithreaded environment, I shouldn't have anything to do, as the error should simply disappear...
-- Guillaume Yziquel http://yziquel.homelinux.org/