Instead, wrap janky signal-unsafe MySQL API calls with signal block/unblock actions at the C level. This should be faster than using bound threads, and also avoids the perils of running out of OS threads documented in http://hackage.haskell.org/trac/ghc/ticket/5174
--HG-- rename : COPYING => LICENSE
--HG-- rename : Database/MySQL.hs => Database/MySQL/Base.hs rename : Database/MySQL/C.hsc => Database/MySQL/Base/C.hsc rename : Database/MySQL/Types.hsc => Database/MySQL/Base/Types.hsc
In brief: Allow both blocking and non-blocking use of the C API. Document the rules (at least as I imagine them to be) for object lifetime management. A pony.
The handling of Result is incorrect at the moment, as MYSQL_RES values must be freed before we can safely call mysql_next_result, but the current automatic freeing of MYSQL_RES via a finalizer does not permit this.
Also improved the performance of withRTSSignalsBlocked.