Throws an assertion error if called from anywhere but this activity's thread.
Close the facility.
Close the facility.
First, decrements the "nested open" count. If it has reached
zero, do a "real" close, using the protected realclose
method.
Otherwise, some other activity is still using the facility, and
it stays open.
When the last activity or service calls close
, the facility
actually does shut down, using the protected realClose
method,
which will shut down threads, close files, or whatever.
Tag for the facility to use in log entries
Tag for the facility to use in log entries
Writes a debugging log method, using the facility's logTag
Writes a debugging log method, using the facility's logTag
Open the facility.
Open the facility.
If the facility isn't already open, does setup which depends on
the particular facility (which may involve opening files,
starting threads, or whatever) --- a "real" open, using the
protected realOpen
method. The given Context
may be used
for setup, depending on the nature of the facility.
If it is already open, just increments a "nested open" count;
see close
below.
Run func
on the facility's thread.
Mixin for AppFacility which provides a "worker thread", which may be used to run things in the background.