Mail Archives: djgpp/1996/08/07/11:30:19
alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams) writes:
> Well, I'd just call a function in main() to do it. Making it automatic
> I would leave to the people who write the startup code... like,
> Charles, I guess, if he think's it's cool. Otherwise, I couldn't be
> bothered to make it automatic!
If you just call it in main, constructors can't use anything that needs
to be locked.
As a stopgap solution, the locker itself could be a constructor for a
static object. You'd put a single instance of that object in a file,
preferably the first file linked. That would also let you only include
the library code when you had stuff to lock.
> Wow... I think I've done something cool! :-)
Indeed.
Tom
- Raw text -