Commit Graph

10 Commits

Author SHA1 Message Date
rdb 243ee75e47 express: refactor WeakPointerTo::lock() a little bit 2018-07-30 22:24:55 +02:00
rdb 2d7e80a89e express: add full range of WeakPointerTo ctors and assign ops
Matches PointerTo constructors/assignment operators, supporting conversion between related pointer types.

Fixes #367
2018-07-30 17:26:02 +02:00
rdb 0bb81a43c9 express: make a thread safe weak pointer implementation (#321)
To access a WeakPointerTo in a thread-safe way, use something like this:

    if (auto ptr = weak_ptr.lock()) {
      ..use ptr as regular PointerTo
    }

The new implementation no longer needs a reference to be stored to all weak pointers on the WeakReferenceList; a mere count of weak pointers is sufficient.  Therefore, callbacks theoretically no longer require a WeakPointerTo to be constructed.

The WeakPointerTo class is not actually atomic; it could be made so, but I don't believe it's worth it at this time.
2018-05-15 13:40:21 +02:00
rdb e60d1e292e Make better use of C++ rules for implicit generation; allow PointerTo and some mutex impls to be static initialised 2017-01-12 12:34:15 +01:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
David Rose fb9c56432a we are now using the modified BSD license 2008-05-28 18:37:20 +00:00
David Rose 2b00d098f2 don't let geom-vertex-cache hang on to textures 2006-10-07 00:34:26 +00:00
David Rose a5e9ab5f10 prevent crash in non-threaded case; build niceties 2006-04-12 22:53:20 +00:00
David Rose 475196cbef robustify WeakPointerTo, publish ConstPointerTo 2005-03-11 19:29:57 +00:00
David Rose 557060cb1d weak pointers, and FadeLODNode fixes for instances/multiple cameras 2004-09-30 21:29:25 +00:00