Re: Can basic_string<>::c_str() throw exceptions?

From: Peter Koch Larsen (pklspam_at_mailme.dk)
Date: 02/06/05


Date: Sun, 6 Feb 2005 08:57:17 +0100


"Spacen Jasset" <spacenjasset@yahoo.co.uk> skrev i en meddelelse
news:42058851@x-privat.org...
[snip]
>
> Bit of a minefield the stl if you use say a platform specific lock
> mechanism which isn't an "auto mutex". One can't try every stl call just
> incase.
>

Well... the C++ way of doing things is not to use a "platform specific lock
mechanism", but wrap it so that locks will automatically be unlocked. Yopu
would not be able to do much realistic work with such a beast anyway.

/Peter



Relevant Pages

  • Re: [PATCH 1/19] MUTEX: Introduce simple mutex implementation
    ... > "Shared" state in their cache protocol. ... you might have hardware that otherwise ends up being ... > these things can certainly depend on the platform around the CPU as ... > but lock contention behaviour can be "interesting". ...
    (Linux-Kernel)
  • Re: Detecting multiple class loaders
    ... maybe do the locking in a global way. ... it extensively before trusting it--and on each platform. ... That would certainly imply the scope of the lock goes beyond ... pathnames and port numbers. ...
    (comp.lang.java.programmer)
  • Re: HELP: Is writeq an atomic operation??
    ... If you're not under lock you're screwed on a 32-bit platform. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: check the file lock before read
    ... | How to obtain the lock status of a file held by other process? ... You will probably need some very low level code to do that, ... in a group dedicated to your platform. ... Good luck. ...
    (alt.comp.lang.learn.c-cpp)