[Haskell-cafe] Problem making a program in ghc

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Mar 14 07:23:25 EDT 2008


Hello Sterling,

Friday, March 14, 2008, 7:06:24 AM, you wrote:

yes, it's another question. my own program also writes to logfile and
it got lock-free only when i've switched to using my own IO routines


> This answer may be way off base, but if differences appear between  
> ghci and compiled versions, I've often found its as simple as  
> remembering to compile with the -threaded flag. The ghci runtime is  
> threaded by default, as I understand it, while compiled binaries are  
> not, and IO operations will block in very different fashions (i.e. in
> their own thread, or stalling the entire app) depending on the runtime.

> Regards,
> sterl.

> On Mar 13, 2008, at 3:47 PM, Adam Langley wrote:

>>> web application),
>>> I have a log that confirms that the response arrives correctly.
>>
>> I hate to see any requests for help go unanswered here, but this one
>> might be tough. I think you need to give some more information,
>> otherwise the suggestions are going to be very general. Can you put
>> the Haskell source code on a website somewhere and link to it. Since
>> it's a network service, an example request and reply might be good to
>> include.
>>
>> In general, you should check that you are correctly flushing your
>> connection. If you are using Handles to interface to the network, they
>> can buffer the response. hFlush[1] may need to be called when you have
>> finished generating it.
>>
>> [1] http://haskell.org/ghc/docs/latest/html/libraries/base/System- 
>> IO.html#v%3AhFlush
>>
>> AGL
>>
>> -- 
>> Adam Langley agl at imperialviolet.org http://www.imperialviolet.org
>> _______________________________________________
>> Haskell-Cafe mailing list

> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list