DTVD/rainbowstream — pull request #30 by BryanSalas (2014-08-02 21:13:04+00:00)
Title: Fixed issue #19

I have fixed the problem where the prompt would disappear when a tweet would show up. Part of the problem was the stream process would "mess up" the prompt. I got a solution from here: http://stackoverflow.com/questions/2082387/reading-input-from-raw-input-without-having-the-prompt-overwritten-by-other-th. It looks like it only works with threads so I made the stream a thread instead of a process. I tried keeping it as a process at first but it wasn't able to read the line buffer that was there (maybe has something to do with processes not sharing memory?). Changing from process->thread required me to make some other changes as well, like a lock for the current stream, and a way to kill a thread. I was getting a weird error so I had to change the db file a bit too. I also made it so when you switch streams the prompt comes back, it just makes more sense to me for the prompt to come back, you can always change it if you want. I have tested this code and it works. Let me know if you want me to make other changes or if you find a bug here.