Thanks Bulat,<br><br>I hadn&#39;t even considered doing it that way. :)<br><br>/jve<br><br><div class="gmail_quote">On Fri, Jan 15, 2010 at 3:35 AM, Bulat Ziganshin <span dir="ltr">&lt;<a href="mailto:bulat.ziganshin@gmail.com">bulat.ziganshin@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello John,<br>
<div class="im"><br>
Friday, January 15, 2010, 1:42:15 AM, you wrote:<br>
<br>
&gt; Is it possible to prevent a library from being used unless<br>
&gt; -threaded is enabled? I have a specific case where lots-of-nasty<br>
<br>
</div>yes. it&#39;s how opposite checked in gtk2hs:<br>
<br>
  when (rtsSupportsBoundThreads) $ fail $ &quot;\n&quot; ++<br>
    &quot;initGUI: Gtk+ is single threaded and so cannot safely be used from\n&quot; ++<br>
    &quot;multiple Haskell threads when using GHC&#39;s threaded RTS. You can\n&quot; ++<br>
    &quot;avoid this error by relinking your program without using the\n&quot; ++<br>
    &quot;&#39;-threaded&#39; flag. If you have to use the threaded RTS and are\n&quot; ++<br>
    &quot;absolutely sure that you only ever call Gtk+ from a single OS\n&quot; ++<br>
    &quot;thread then you can use the function: unsafeInitGUIForThreadedRTS\n&quot;<br>
<font color="#888888"><br>
<br>
--<br>
Best regards,<br>
 Bulat                            mailto:<a href="mailto:Bulat.Ziganshin@gmail.com">Bulat.Ziganshin@gmail.com</a><br>
<br>
</font></blockquote></div><br>