current
var current(var type);
Returns the current active object of the given type
.
Usage
var gc = current(GC);
show(gc);
var thread = current(Thread);
show(thread);
Implicit Object
The Current
class can be implemented by types which have implicit instances associated with them. For example it can be used to retrieve the current Thread
, or it could be used to get the current Garbage Collector.
This class may be implemented by types which express the Singleton Design Pattern
struct Current {
var (*current)(void);
};