5 Jun
2013
5 Jun
'13
2:07 p.m.
Hi.
On Wed, Jun 5, 2013 at 1:59 PM, Kiwamu Okabe
Now, I am trying create forkOS with pthread. But StablePtr error stops it. Jhc's newStablePtr cannot pack IO () for running with unpack.
This is small library for forkOS. https://github.com/ajhc/ajhc-dumpyard/tree/master/try_pthread2 But forkOS API is different from GHC's.
forkOS :: FunPtr (Ptr () -> IO (Ptr ())) -> IO ThreadId
I would like to convert any IO () to FunPtr (IO ()). Of course, GHC has foreign import ccall “wrapper”, but jhc not. No idea in me....... Regards, -- Kiwamu Okabe