Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Sepples Timer Issue

Name: !a301wVUFtU 2009-01-30 0:29

So I have this timer class implementation mostly done with extensive use of boost, bind, etc. It's logically structured as having a default container and containers are available as a type so you can include them with any classes. When the container dies, so do the timers in it. There's a specific timer thread in this application that does all timer operations.

After coding for 5 hours straight, I've no fucking clue what I'm doing and this is likely the last barrier to my code working masterfully.

I have a class that's implemented as a singleton that manages all the resources necessary to it. When I pass resources for it to handle, it works perfectly fine if I only pass resources once before the timer ends. However, if I queue up numerous resources to handle, the timer causes a heap error upon the first completion of the timer which is supposed to spawn another timer that does the same thing.

The only thing I can think of is that I'm doing pointer-to-member functions wrong, but god damn if I can figure out how to do it.

Any anons happen to have advice or questions about things I should be elaborating on? Thanks in advance.

Name: Anonymous 2009-01-30 13:43

>>12
I think what he meant in 3) is more retarded than you think: he's not concerned that you might make another instance of the singleton's class, he simply isn't aware that to make a global visible to other compiling units that you have to define it in its own unit and declare it in a header using the extern keyword. You see, he defines "globals" directly in headers and gets around the "multiple definitions of <global>" errors by using static to turn each global into a bunch of duplicate unit-locals.

That level of ignorance was expected, though. People who use design patterns as a security blanket are usually morons.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List