This
method creates and retrieves the singleton instance of OMMainThread.
Signaturestatic OMThread* instance (int create = 1);
Parameterscreate
Specifies whether an instance should
be created. If this is set to 1, an OMMainThread instance
is created.
If create is set
to 0, the instance method returns
one of the following values:
- The singleton
instance, if it already exists
- NULL, if the
instance does not exist
NotesIf
a main thread does not exist, OMMainThread creates
one and returns OMMainThread. If a main thread already
exists, OMMainThread returns the OMMainThread.