Hello fellow Haskell
programmers,
I seem to be having problems with some threads of mine. I wrote an
OpenGL program that employs some threads (forkIO) in order to separate
any calculations from the OpenGL code. At first it all seemed to be
working just fine. Then I added some code for keyboard input to reset
the program when you press 'r'. Since then my threads have been giving
me problems. Just a second after the program starts all the
calculations stop. The program is still running the code to display
graphics (I tested this by putting "putStrLn "still displaying" into
the display function) but the threads that do all of the computation
don't seem to return from their threadDelay, which is only a delay of
5000 microseconds. I tried getting rid of the code for keyboard input
but the problem is still there. I tried to run the program on another
computer and it ran just fine (without keyboard input). Does anyone
have any idea what could be going on?
Additionally, I just tried compiling it to an executable and it seems
that when I run it from that it works fine, with the keyboard input
too. So I'm guessing the problem is with the interpreter? I'm not
really sure. Haskell is still pretty mysterious to me.
-Eitan