« Home » « Learn » « Download » « Github »

logo

Cello High Level C

Methods

current

var current(var type);

Returns the current active object of the given type.

Examples

Usage

var gc = current(GC);
show(gc);
var thread = current(Thread);
show(thread);

Current


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

Definition

struct Current {
  var (*current)(void);
};

Implementers

  • Exception |     Exception Object
  • GC |     Garbage Collector
  • Thread |     Concurrent Execution

Back