So, last time I was complaining about the horrible threaded mess I created for myself when I thought I could make do without any real structured networking system. If you read it, you know I was wrong.
The first thing I did was rip out my old code and implement twisted. I forced the threadedselectreactor to play nice in my code, but nothing happened when I made network calls. No errors, no connections, no feedback. The twisted reactor is working correctly, adding and processing events as it should, but nothing happens. I’m sure I did something wrong, but I couldn’t figure out what it was.
However, something good came from this! Working with twisted made me realize how foolish I had been with my code. Now I’ve created a network class and moved all the threading there with a simple callback system. It is much MUCH cleaner and a dream to work with compared to the ugly crap I had before. I haven’t fully changed the code over yet, but I’m so much happier about it already that I felt the need to put it down here.
Another lesson to be learned — sometimes your reinvented wheel kicks ass.
Recent Comments